We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate the possibility of an automatic route tree.
Currently, we have a template that looks like this prototype-wrapper.component.html:
prototype-wrapper.component.html
<li> <h4 class="br-styleguide-bordered-list-header">Documentation</h4> <ul class="br-styleguide-bordered-list"> <li> <a routerLink="/sign-in">Sign in</a> </li> <li> <a routerLink="/dashboard">Dashboard</a> </li> </ul> </li> ...(code abbreviated)
There is also routing data in app-routing.module.ts:
app-routing.module.ts
const routes: Routes = [ { path: 'sign-in', component: SignInComponent }, { path: 'styleguide', component: StyleguideComponent }, { path: '', redirectTo: '/sign-in', pathMatch: 'full' }, { path: 'dashboard', component: DashboardComponent, children: [ { path: 'module-1', component: ModuleOneComponent }, { path: 'module-2', component: ModuleTwoComponent }, { path: 'module-3', component: ModuleThreeComponent }, ] }, { path: 'styleguide', component: StyleguideComponent, children: [ { path: 'colors', component: ColorsComponent }, { path: 'typography', component: TypographyComponent }, { path: 'icons', component: IconsComponent }, { path: 'button-skins', component: ButtonSkinsComponent }, ] }, ];
Can we somehow use this to create a loop to loop over our tree? I crafted some non-working code as an example:
<li *ngFor="let route of routes" [class.selected]="route === activeRoute" > <a href="{{route.path}}"> {{route.name}} </a> </li>
The text was updated successfully, but these errors were encountered:
Beetje rond gegoogled, maar niets gedaan met de code, dat laat ik aan @insit .
https://stackoverflow.com/questions/43907340/getting-all-routes-from-current-module-angular-2 https://stackoverflow.com/questions/37569936/how-to-list-output-all-routes-in-routes-in-my-angular2-app/45492930
Sorry, something went wrong.
No branches or pull requests
Investigate the possibility of an automatic route tree.
Currently, we have a template that looks like this
prototype-wrapper.component.html
:There is also routing data in
app-routing.module.ts
:Can we somehow use this to create a loop to loop over our tree? I crafted some non-working code as an example:
The text was updated successfully, but these errors were encountered: