1ngOnInit(){
2 this.router.events.subscribe(event =>{
3 if (event instanceof NavigationStart){
4 console.log(event.url)
5 this.routerChangeMethod(event.url);
6 }
7 })
8}
9
10routerChangeMethod(url){
11 this.title = url;
12}
13