forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.module.ts
45 lines (42 loc) · 1.27 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// #docplaster
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
import { AppComponent } from './app.component';
import { CarComponent } from './car/car.component';
import { HeroesComponent } from './heroes/heroes.component';
import { HeroListComponent } from './heroes/hero-list.component';
import { InjectorComponent } from './injector.component';
import { Logger } from './logger.service';
import { TestComponent } from './test.component';
import { UserService } from './user.service';
import { ProvidersModule } from './providers.module';
// #docregion ngmodule
@NgModule({
imports: [
BrowserModule,
ProvidersModule
],
declarations: [
AppComponent,
CarComponent,
HeroesComponent,
// #enddocregion ngmodule
HeroListComponent,
InjectorComponent,
TestComponent
// #docregion ngmodule
],
// #docregion providers, providers-2
providers: [
// #enddocregion providers
Logger,
// #docregion providers
UserService,
{ provide: APP_CONFIG, useValue: HERO_DI_CONFIG }
],
// #enddocregion providers, providers-2
exports: [ CarComponent, HeroesComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }