$rootScope.$on("$routeChangeStart",
(event, current, previous, rejection) => {
if (/#\//.test($window.location.hash)) {
$location.path($window.location.hash.replace('#', ''));
}
});
如何转换为ES5?
我想删除=>代码因为uglify无法使用它...
答案 0 :(得分:2)
$rootScope.$on("$routeChangeStart",
function(event, current, previous, rejection) {
if (/#\//.test($window.location.hash)) {
$location.path($window.location.hash.replace('#', ''));
}
});