pau-riquelme

Untitled

Jan 17th, 2018
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { NgModule } from '@angular/core';
  2. import { CommonModule } from '@angular/common';
  3. import { RouterModule } from '@angular/router';
  4. import { CommonComponentsModule } from '../common/common-components.module';
  5.  
  6. import { HomeComponent } from '../common/home/home.component';
  7.  
  8. @NgModule({
  9.   imports: [
  10.     //Nos importamos el module CommonComponentsModule para tener acceso a sus componentes
  11.     //En este caso: HomeComponent
  12.     CommonComponentsModule,
  13.     CommonModule,
  14.     RouterModule.forChild([
  15.       {path: '', redirectTo: 'home', pathMatch: 'full'},
  16.       {path: 'home', component: HomeComponent},
  17.       //Aquí como vimos en el ejemplo anterior, hacemos referencia al module que se encarga
  18.       //de las estadísticas.
  19.       {path: 'stats', loadChildren: './stats.module#StatsModule'}
  20.     ])
  21.   ],
  22.   declarations: []
  23. })
  24. export class AdminModule { }
Advertisement
Add Comment
Please, Sign In to add comment