【发布时间】:2020-03-25 07:44:31
【问题描述】:
我需要 AngularJS 中的外部重定向方面的帮助。
这是我的路线:
$routeProvider.when('/route1/', {
template: html_externalRedirect,
resolve: resolver(['core/controllers/ExternalRedirectController'])
});
这是我的重定向控制器:
define(['myApp',], function (myApp) {
'use strict';
myApp.lazy.controller('ExternalRedirectController', ['$location', '$window',
function ($location, $window) {
$window.location = baseUrl + $location.path();
}]);
});
重定向成功,但是当我单击“返回”浏览器按钮时,它会将我重定向到“未找到”页面。似乎,窗口历史记录中的记录是错误的。 谁能帮我解决这个问题?
【问题讨论】:
标签: javascript angularjs ngroute