SHARE
TWEET

route child

sangueroots Jul 26th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { NgModule } from '@angular/core';
  2. import { Routes, RouterModule } from "@angular/router";
  3. import { IndexComponent } from './index/index.component';
  4. import { DespesaComponent } from './despesa/despesa.component';
  5. import { ReceitaComponent } from './receita/receita.component';
  6. import { ResumoMensalComponent } from './resumo-mensal/resumo-mensal.component';
  7. import { ResumoAnualComponent } from './resumo-anual/resumo-anual.component';
  8.  
  9.  
  10. const routes: Routes = [
  11.     // App routes goes here here
  12.     {
  13.         path: 'dashboard',
  14.         component: IndexComponent,
  15.         children: [
  16.             { path: '', component: IndexComponent },
  17.             { path: 'despesa', component: DespesaComponent },
  18.             { path: 'receita', component: ReceitaComponent },
  19.             { path: 'despesa/mensal', component: ResumoMensalComponent },
  20.             { path: 'despesa/anual', component: ResumoAnualComponent },
  21.         ]
  22.     }
  23. ]
  24.  
  25.  
  26. @NgModule({
  27.     declarations: [DespesaComponent],
  28.     imports: [ RouterModule.forChild(routes) ],
  29.     exports: [ RouterModule ],
  30.     providers: [],
  31. })
  32.  
  33.  
  34. export class DashboardRoutingModule {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top