嗨,我的 Controller 中有以下内容,应该加载页面
$scope.testing = function () {
$window.location.href = "#/iCharges/";
};
路线和一切都进展顺利。唯一的问题是,当加载页面时,浏览器中的 url 显示为
http://localhost:60482/main/loc#%2iCharges%2F
问题是,网址不是显示#/iCharges/,而是替换为#%2iCharges%2F
我该如何解决这个问题?谢谢
最佳答案
这是您在 Angular 中导航到 View 的方式:
$scope.testing = function () {
$location.path('/iCharges');
};
关于javascript - 地址栏中的 Angularjs 编码值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24072596/