首页 > 技术文章 > angularjs 默认跳转

RoadAspenBK 2018-11-07 16:26 原文

angularjs  的 $state.go() 跳转页面 ,目标页面的js函数 的执行 先于  $locationChangeStart 的监听函数。

故意 添加 timeout 可以使 controller 在locationchangestart 之后触发。

推荐阅读