0
ルートを照合することはできませんとして、なぜ私はこれは表のようにAngular2のparametrベースのルーティングエラーを助ける私はルーティングPlaseベースAngular2遅延読み込みパラメータを使用しています。ここ
<tr *ngFor="let emp of employee">
<td><a href="#" (click)="GetById($event,emp)">{{emp.EmpName}}</a></td>
GetById(e, emp) {
debugger;
this.id = emp.Emp_Id;
this._router.navigate(['/EditById/' + this.id])
}
からこのIDを渡している。ここError: Cannot match any routes: 'EditById/1113'
取得イムマイMainRoute.ts
export const ApplicationRoutes:Routes= [
{ path: 'EditById/:id', loadChildren: '../modules/employee/editemployeebyidmdule#EitEmployeeModule' },
EmployeeRoute.ts
import { Routes } from "@angular/router"
import { EditEmployeeByIdComponent } from "../components/employeecomponent/editemployeebyidcomponent"
export const EmployeeRoute=[
{ path: 'id', component: EditEmployeeByIdComponent}
]
する必要があります:「/ 1108 EditById」 –
我々はngOnInitから何かをその必要があるということです –