angular 里$state.includes 写这个不起作用
I found the reason, maybe $scope is not enough scope, you should use $rootScope
nameurl.controller.js
$rootScope.nameURL = $state.includes("nameURL.**");
This sentence means that all nameURL and nameURL subpages will return true
index.html
<li><a ui-sref="nameurl.about" ng-class="{active: nameURL}">关于我们</a></li>
I found the reason, maybe $scope is not enough scope, you should use $rootScope
nameurl.controller.js
This sentence means that all nameURL and nameURL subpages will return true
index.html