I need help with external redirecting in AngularJS.(我需要有关AngularJS外部重定向的帮助。)
This is my route:(这是我的路线:)
$routeProvider.when('/route1/', {
template: html_externalRedirect,
resolve: resolver(['core/controllers/ExternalRedirectController'])
});
This is my redirect controller:(这是我的重定向控制器:)
define(['myApp',], function (myApp) {
'use strict';
myApp.lazy.controller('ExternalRedirectController', ['$location', '$window',
function ($location, $window) {
$window.location = baseUrl + $location.path();
}]);
});
Redirect works successfully, but when I click 'back' browser button, it redirects me to 'not found' page.(重定向成功完成,但是当我单击“后退”浏览器按钮时,它会将我重定向到“未找到”页面。)
Seems like, records in window history are wrong.(好像,窗口历史记录中的记录是错误的。) Could anyone help me solve this issue?(谁能帮我解决这个问题?)
ask by Dmytro Pavliuchenko translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…