angular direct page path code example
Example 1: home page routing in angular
const routes: Routes = [
{ path: 'home_page_path', component: HomePageComponent }
];
add this in app routing file
Example 2: angular routing url params
const appRoutes: Routes = [
{ path: 'crisis-center/:param1', component: CrisisListComponent },
{ path: 'hero/:param2', component: HeroDetailComponent },
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes,
{ enableTracing: true }
)
],
...
})
export class AppModule { }