0
Ich habe in meiner Angular 2 App einige Kinderrouten erstellt.Leeres Kind Route in Angular 2
export const AFTER_LOGIN_ROUTES:Routes=[
{path:'',component:LatestPositionComponent},
{path:'add',component:AddNewFriendComponent},
{path:'history',component:HistoryComponent}
];
Wenn ich http://localhost:4200/app/add oder http://localhost:4200/app/history alles Zugriff ist in Ordnung.
Aber im Fall von http://localhost:4200/app Ich habe einen Fehler bekommt:
EXCEPTION: Uncaught (in promise): Error: Error in :0:0 caused by: Cannot read property 'firstChild' of null
Error: Error in :0:0 caused by: Cannot read property 'firstChild' of null
at ViewWrappedError.ZoneAwareError
Irgendwelche Ideen?
Ist 'Pfad: 'add'' ein Tippfehler (statt'' app'')? –
Nein, die 'App' hat 3 Kinder. Eine leere, 'add' und' history' –
Dann zeigen Sie bitte auch die 'app' Route in Ihrem Code. –