官术网_书友最值得收藏!

Main application NgModule

Let's also take a look at the main NgModule generated by the Angular CLI. You can find it in the path src/app/app.module.ts:

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
bootstrap: [AppComponent],
providers: []
})
export class AppModule { }

If you've been following the section Angular NgModule, about NgModule within the first chapter of this book, there should not be any surprises when looking at our generated main application module.

Our application currently only consists of one component, the AppComponent, which we're declaring within our AppModule. We also specify that this component should be bootstrapped when this module is being bootstrapped.

主站蜘蛛池模板: 巩义市| 芜湖县| 宝清县| 宜春市| 东丰县| 清河县| 双桥区| 东乌珠穆沁旗| 道真| 资兴市| 清徐县| 寿光市| 新野县| 长顺县| 浙江省| 凌云县| 黄梅县| 玉溪市| 芜湖县| 陈巴尔虎旗| 大石桥市| 诸暨市| 仪陇县| 潞西市| 汽车| 黄石市| 蛟河市| 侯马市| 吉安县| 连云港市| 普兰店市| 正镶白旗| 平和县| 星子县| 泰顺县| 安宁市| 青河县| 斗六市| 科尔| 永平县| 怀远县|