how to move somone with function to another place in the site with angular routing code example
Example 1: how to add changes every time you route navigate to page in angular
// 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){
}
})
}
Example 2: this.router.navigate
<a routerLink="/red-pill/neo">Go!</a>