首页 > angularjs 路由切换时给 html 做 id 标示

angularjs 路由切换时给 html 做 id 标示

刚刚接触 angularjs
有什么办法在路由切换时 能否给 html 标签上加个 id 或者什么唯一标示之类的?


可以使用$location service里面的$locationChangeSuccess事件,在回调函数里面你可以做任何需要做的事情。

【热门文章】
【热门文章】