Cannot match any routes. URL Segment: '': When trying to use child routes and Ng2

Discussão em 'Angular' iniciado por Jackie, Novembro 21, 2024.

  1. Jackie

    Jackie Guest

    I have the following plunker, which does not work. In order to get it to work I can comment out...

    RouterModule.forRoot([
    {
    path: "",
    component: TestComponent,
    children: [
    // {
    // path:"",
    // outlet: "other",
    // component: TestComponent
    // }
    ]
    }
    ])


    If I don't do that I get...

    EXCEPTION: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ''
    Error: Cannot match any routes. URL Segment: ''


    How do I add a child route?

    Continue reading...

Compartilhe esta Página