当当前ngroute与a标签href匹配时,如何在<A>
标记上放置一个类。我知道ui-router中有ui-active但我使用的是ngroute。
答案 0 :(得分:0)
我创建了一个解决您问题的github项目。
https://github.com/ionescuvictor/ngRoute-active-directive
<a route-active="active" href="/#/Test" ></a>
转变为
<a class='active' href="/#/Test"></a>