How to detect current state within directive

后端 未结 5 2089
臣服心动
臣服心动 2020-12-07 10:36

I\'m using AngularUI\'s routing and I\'d like to do a ng-class=\"{active: current.state}\" but I\'m unsure how to exactly detect the current state in a directiv

5条回答
  •  旧巷少年郎
    2020-12-07 11:18

    The use of ui-sref-active directive that worked for me was:

  • Administration Panel
  • as found here under the comment labeled "tgrant59 commented on May 31, 2016".

    I am using angular-ui-router v0.3.1.

提交回复
热议问题