angular-docs-cn/public/docs/_examples/style-guide/ts/02-07/app/app.module.ts

20 lines
462 B
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { HeroComponent } from './heroes';
import { UsersComponent } from './users';
@NgModule({
imports: [
RouterModule.forChild([{ path: '02-07', component: AppComponent }])
],
declarations: [
AppComponent,
HeroComponent,
UsersComponent
],
exports: [ AppComponent ]
})
export class AppModule {}