Changing Navigation Menu using UI-Router in AngularJs

后端 未结 2 1188
情书的邮戳
情书的邮戳 2021-01-13 19:31

I\'m trying to build a navigational menu like any social networking site i.e. If i\'m logged-Out i Can see the input fields asking for Usern

2条回答
  •  执笔经年
    2021-01-13 19:56

    You could use one of the following angular directives: ng-if, ng-show, ng-hide

    Check in your controller if the user has signed in successfully and assign this value a ($scope) variable and use this as a condition to either show or hide certain elements of your navigation bar.

提交回复
热议问题