ボタンをクリックして別のページに移動しようとしましたが、機能しません。何が問題なのか。私は今、角度2を学んでいます、そして、今は私にとってはちょっと難しいです。角2のボタンで別のページに移動
//Routes/Path in a folder call AdminBoard
export const AdminRoutes: Routes =[
{
path: 'dashboard',
component: AdminComponent,
children: [
{path: '', redirectTo: 'Home'},
{path: 'Home', component: HomeComponent},
{path: 'Service', component: ServiceComponent},
{path: 'Service/Sign_in', component:CustomerComponent}
]
}
];
//Button is also in a different folder. Click button to navigate to this page {path: 'Service/Sign_in', component:CustomerComponent}
<button class="btn btn-success pull-right" ><a routerLink="/Service/Sign_in"> Add Customer</a></button>
クリックで角2のリダイレクトが可能です(http://stackoverflow.com/questions/37252146/angular-2-redirect-on-click) – Habeeb
次のように試してください: ' –