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

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.

主站蜘蛛池模板: 霸州市| 光泽县| 开远市| 徐水县| 西乌| 额济纳旗| 包头市| 称多县| 广南县| 永年县| 晋州市| 和田县| 志丹县| 菏泽市| 五家渠市| 库车县| 溧水县| 曲阳县| 海宁市| 阿拉尔市| 新干县| 隆化县| 栖霞市| 苏尼特右旗| 阳城县| 通江县| 伊春市| 新丰县| 峨眉山市| 内丘县| 时尚| 甘南县| 全州县| 砚山县| 雷波县| 富民县| 西城区| 大荔县| 慈利县| 响水县| 闻喜县|