小编das*_*boe的帖子

来自$ routeChangeStart的URL在angularjs路由中的params

怎么可能URL从路由参数中获取哈希片段$routeChangeStart.

$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'
});
Run Code Online (Sandbox Code Playgroud)

接收URL hash片段很容易使用,$locationChangeStart但这对我来说不是一个选择.

angularjs angularjs-routing

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

angularjs ×1

angularjs-routing ×1