RouterModule.forRoot([
{
path: "",
component: HomeComponent
},
{
path: "edit/:id",
component: EditComponent
}
])
<button [routerLink] = "">Cancel</button>
Above is my router module and html button. I am not able to redirect to HomeComponent
. How to achieve it? TIA.
<a routerLink="/"><button class="btn btn-default" >Cancel</button></a>