在该标题组件中,我导航到仪表板路径,即使我已经在该路径中。
this.router.navigate(['/venues', this.currentVenue._id, 'dashboard']);
但它不会再次触发ngOnInit钩子,因此不会重新加载我的视图。
是否需要重新加载视图?或者只是注册一些数据?
ngOnInit(): void { this.route.params.subscribe( params => { const id = +params['id']; this.getMovie(id); // <- Or whatever you need to do here } ); }