Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from '@angular/core';
- import { CommonModule } from '@angular/common';
- import { RouterModule } from '@angular/router';
- import { CommonComponentsModule } from '../common/common-components.module';
- import { HomeComponent } from '../common/home/home.component';
- @NgModule({
- imports: [
- //Nos importamos el module CommonComponentsModule para tener acceso a sus componentes
- //En este caso: HomeComponent
- CommonComponentsModule,
- CommonModule,
- RouterModule.forChild([
- {path: '', redirectTo: 'home', pathMatch: 'full'},
- {path: 'home', component: HomeComponent},
- //Aquí como vimos en el ejemplo anterior, hacemos referencia al module que se encarga
- //de las estadísticas.
- {path: 'stats', loadChildren: './stats.module#StatsModule'}
- ])
- ],
- declarations: []
- })
- export class AdminModule { }
Advertisement
Add Comment
Please, Sign In to add comment