app.run(function($rootScope, $location, $anchorScroll) {
//when the route is changed scroll to the proper element.
$rootScope.$on('$routeChangeSuccess', function(newRoute, oldRoute) {
console.log("called routeChangeSuccess");
if ($location.hash()) $anchorScroll();
});
});
- 点击到结束的一个将导航到div id为
- 第二次点击同链接它不会做任何事
我做错了什么?或者这与角度有关?
注:破解这个是使用点击事件,这应该工作找的使用角度和路由版直方案
1.5.5
*增加赏金
请回答工作发布。希望能帮助到你。 –