Open web-dave opened 4 years ago
ng g c BlaBla
const routes: Routes = [
{
path: '',
component: BlaBlaComponent,
},
];
const routes: Routes = [
{
path: 'heros',
component: ListComponent,
},
];
<h2><a routerLink="/">BlaBla</a> | <a [routerLink]="['heros']">Heros</a></h2>
<router-outlet></router-outlet>
Generiere eine
BlaBlaComponent
in dasAppModule
Wenn keine Route angegeben wird, soll dieBlaBlaComponent
angezeigt werden. Wenn die Route/heros
angegeben wird, soll dieListComponent
angezeigt werden. Schreibe eine einfache Navigation in derapp.component.html