如何在$routeChangeStart中从路由参数中获取URL哈希片段?
$scope.$on('$routeChangeStart', function (event, next, current) {
// trying to get the url hash fragment from <next> param here
// e.g. to_url_function(next) -> '/my_path/1'
});
如果使用$locationChangeStart
,接收URL哈希
片段很容易,但这对我来说不是一个选项。