1

I am trying to find whether I can hide the parent file contents when accessing a partial(view) in angularJs. Here is my problem:
I have my parent page (index page) with contents like menubar, footer and some other stuff which will be displayed in all the pages in my product. I have included ng-view in between the stuff and the footer. Now, in a particular page, I don't want to show this menubar, footer. I need to show only that particular stuff which is present in the partial. So, I need to hide the menubar, footer and all other stuff which is from parent scope. Is it possible to do it with angularJS?

Thanks in advance!

anilCSE
  • 2,461
  • 3
  • 23
  • 29

1 Answers1

2

you can set a $rootScope variable that says whether to display menu or not (according the route)

// particular route controller
$rootScope.hideMenu = true;

and then in the markup add

ng-hide="hideMenu"

to any element you want not to display

doodeec
  • 2,927
  • 19
  • 23