I am beginner in angular 2 and i am trying to do some routing practice. I have a button on productDetailComponent. Now when i click on the button, it want the page to route to moreDetailComponent.
export const TutorialRoutes: Routes =[
i w
{
path: 'Company',
component: CompanyComponent,
children: [
{path: '', redirectTo: 'people'},
{path: 'price', component: PriceComponent},
{path: 'products', component: ProductComponent,
children:[
{path: '', redirectTo:'product-details'},
{path:'product-details', component:ProductDetailsComponent},
{path:'more',component: MoreDetailsComponent}
]
},
]
}
];
// button to move to page (moreDetailsComponent)
<button routerLink="more">Add</button>