Angular Simple Routing
app.routing.module.ts
onst routes: Routes = [{
component:HomeComponent,
path:'home'
},
{
component:UserComponent,
path:'user'
},
{
component:UserComponent,
path:'about'
}
app.component.html
<a routerLink=" ">Home</a><br><a routerLink="about">About</a><br><a routerLink="user">User</a><br>
<router-outlet></router-outlet>
<a routerLink=" ">Home</a><br>
<a routerLink="about">About</a><br>
<a routerLink="user">User</a><br>
<router-outlet></router-outlet>
Comments
Post a Comment