angularjs在ng-click中使用function怎么进行路由切换

2025-04-15 03:50:05
推荐回答(2个)
回答1:

  直接用UI-router比较方便。不用的话直接用angular的router进行跳转就好了$location

回答2:

$scope.gotopage = function() {
$location.path('/pageroot');
}