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

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.

主站蜘蛛池模板: 息烽县| 定陶县| 铜山县| 南宁市| 北票市| 平塘县| 突泉县| 大理市| 德令哈市| 正定县| 崇明县| 甘孜| 柳州市| 新丰县| 稻城县| 屏东县| 辽阳县| 安徽省| 韶关市| 隆昌县| 台北市| 封开县| 那坡县| 铁岭市| 贡觉县| 云南省| 确山县| 晋江市| 长阳| 天等县| 潜江市| 高尔夫| 乐亭县| 绥江县| 仙桃市| 邯郸县| 新营市| 万年县| 沽源县| 新野县| 万全县|