📌  相关文章
📜  每次路由导航到角度页面时如何添加更改 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:26.440000             🧑  作者: Mango

代码示例1
// Place import at the top
import { Router,NavigationStart} from '@angular/router';

//Place the code below inside your class
constructor(private router: Router){}

ngOnInit(){
   this.router.events.subscribe(event =>{
      if (event instanceof NavigationStart){
           
      }
   })
}