मैं एक बटन क्लिक करके दूसरे पृष्ठ पर नेविगेट करने का प्रयास कर रहा हूं लेकिन यह काम करने में विफल है। क्या समस्या हो सकती है। मैं अब कोणीय 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>
<button class="btn btn-success pull-right" ><a [routerLink]="[ '.', 'Service/Sign_in' ]"> Add Customer</a></button>