0

I'm using snapjs to add a nice menu to my mobile web view app but I need to hide(or avoiding drag) the menu in some pages like login or signup. I've tried with ng-if and it worked but I have a strange problem. My login/signup page looks like this; .
How do I remove the white space?
My HTML(index.html);

  <div class="all-elements">

<sidenav ng-if="isSideDrawerVisible" ></sidenav>
...
...

My angular code(app.js);

if("/login" === path){
    $scope.isSideDrawerVisible = false;
}else{
    $scope.isSideDrawerVisible = true;
}

Note: My console doesn't show any error.

isherwood
  • 58,414
  • 16
  • 114
  • 157
tpbafk
  • 501
  • 5
  • 26
  • 1
    try with `$rootScope` instead of `$scope` – Ravikumar Rajendran Dec 11 '18 at 11:23
  • Tried but no luck. I also tried to disable drag option of the library with following this link: https://github.com/jakiestfu/Snap.js/#disable-disables-sliding-events but didn't worked that. – tpbafk Dec 11 '18 at 11:27
  • can you update me as to whether my answer worked for you,please read my follow up notes under it aswell. – Tom Edwards Dec 11 '18 at 14:43
  • didn't work for me(or I couldn't use it properly. I'm new in angular). I can load or unload with `data-snap-ignore='true'` attribute. – tpbafk Dec 11 '18 at 14:57

1 Answers1

0

ng-hide="$location.path() = urlYouDontWantItToShowIn"

Tom Edwards
  • 124
  • 1
  • 13