0

As an angular newbie trying to understand how things are done

I have a list of links like the following

<ul>
    <li><a href="/a">a</a></li>  
    <li><a href="/b">b</a></li>
    <li><a href="/c">c</a></li>  
</ul>

Currently I am outputting that as a transcluded html using a directive. One of these links is the page I am actually on ( I guess this is not available in routes etc. because app only uses directives, so any solution that is not directive based shouldn't work)

If I am on page a how do I remove the list item that has a link to page a?

user254694
  • 1,461
  • 2
  • 23
  • 46
  • What is your error.? confusing. – Wasiq Muhammad May 08 '16 at 11:18
  • What you need is ngHide directive https://docs.angularjs.org/api/ng/directive/ngHide – starky May 08 '16 at 11:56
  • Have you checked this? http://stackoverflow.com/questions/22338743/how-do-i-use-angular-ng-hide-based-on-the-page-route-that-i-am-currently-on What you may be looking for is: $scope.showPageHero = $location.path() === '/a'; – Baki May 08 '16 at 12:27

0 Answers0