我只是好奇,当我们在当前页面中使用router.navigate时,会调用哪些生命周期挂钩,比如重新加载页面。
constructor(private router: Router) { }
reload () {
this.router.navigate(['/currentpage']);
} 发布于 2019-04-02 08:55:54
这是序列
允许您跟踪路由器生命周期的路由器事件。路由器事件的顺序如下:
发布于 2019-04-02 09:14:15
在AfterViewChecked上使用this.router.navigate(['/currentpage']);时,只会触发/currentpage。
https://stackoverflow.com/questions/55470457
复制相似问题