【发布时间】:2014-08-20 05:56:15
【问题描述】:
angular.module('example').service('myService', function
myService($rootScope,$route,$http,$location) {
$("#mainwindowscroll").on('scroll', function (e) {
$location.path('/about');
});
});
【问题讨论】:
-
$location 值是什么???
-
$location.path = 'about' ????
-
您应该创建一个指令来执行这种操作。如果你来自 jQuery,你可以阅读这个stackoverflow.com/questions/14994391/…
-
@C-linkNepal 有角度的家伙会知道 $location 是什么。
标签: javascript angularjs angularjs-directive ngroute angularjs-ng-route