sup*_*all 8 javascript angularjs
我正在尝试重新加载页面使用$route.reload()
:
var App = angular.module("App", ["ngRoute"]);
var idx = 0;
App.controller("List", function ($scope, $route) {
$scope.changeWallet = function (index) {
idx = index;
$route.reload();
console.log("success");
};
}
Run Code Online (Sandbox Code Playgroud)
"success"
在控制台中显示,但没有任何反应.
我怎样才能解决这个问题?
Cha*_*ani 10
如果要重新加载整个页面而不是路由刷新注入$window
服务并调用location.refresh
$window.location.reload();
归档时间: |
|
查看次数: |
9518 次 |
最近记录: |