Analysis error while creating router name in Angular 4 inside component

Im using Angular 4 to create my admin panel. On the left, I have a menu loaded from the main router. On the left is the green area in which I want to load another component. I used a new router called "console-router". However, I can’t get the content to display. The other component has valid HTML inside, and the main router works fine. I get a parsing error when defining (links), which should show the contents of the "Application Bar" in the left pane.

Screenshot from the console

I defined my paths in the application module:

app.module.ts

{
 path: 'console',
 component: ConsoleComponent,
 children: [
    {
        path: 'dashboard',
        component: AppDashboardComponent,
        outlet: 'console-router'
    }
 ]
}

Here is the link that should download the component when the "Application Panel" button is clicked:

console.component.html

<li><a [routerLink]="[{ outlets: { console-router: ['dashboard'] } }]">App Dashboard</a></li>

.

console.component.html

<router-outlet name="console-router"></router-outlet>

, ( , Angular.io ):

enter image description here

+4
1

, , . (-) . , Angular.

!

+3

Source: https://habr.com/ru/post/1680236/


All Articles