Q:

route path angular

import {Router} from '@angular/router'; // import router from angular router

export class Component{ 				// Example component.. 
	constructor(private route:Router){} 
  
  	go(){
		this.route.navigate(['/page']); // navigate to other page
	}
}
11
// Here’s a basic example using the navigate method:

goPlaces() {
  this.router.navigate(['/', 'page-name']);
}

/*
I hope it will help you.
Namaste
*/
6
const routes: Routes = [
  { path: 'home_page_path', component: HomePageComponent }

];
add this in app routing file
/*
I Hope it will Help You.
Namaste _/\_
*/
3
const routes: Routes = [
  { path: 'first-component', component: FirstComponent },
  { path: 'second-component', component: SecondComponent },
];
0

New to Communities?

Join the community