Answers for "how to navigate without realoding angular"

0

how to navigate without realoding angular

import { Location } from '@angular/common';

constructor(private location: Location) { }

this.location.replaceState('/profile');
Posted by: Guest on January-05-2021
-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){
   		
      }
   })
}
Posted by: Guest on March-05-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language