- Mastering Angular Components
- Gion Kunz
- 115字
- 2021-07-23 17:23:43
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.
推薦閱讀
- 計(jì)算機(jī)網(wǎng)絡(luò)與通信(第2版)
- 6G潛在關(guān)鍵技術(shù)(下冊(cè))
- FreeSWITCH 1.2
- 自動(dòng)駕駛網(wǎng)絡(luò):自智時(shí)代的網(wǎng)絡(luò)架構(gòu)
- 物聯(lián)網(wǎng)安全(原書第2版)
- 物聯(lián)網(wǎng)工程規(guī)劃技術(shù)
- 從區(qū)塊鏈到Web3:構(gòu)建未來互聯(lián)網(wǎng)生態(tài)
- 射頻通信系統(tǒng)
- 計(jì)算機(jī)網(wǎng)絡(luò)原理與應(yīng)用技術(shù)
- Getting Started with nopCommerce
- Laravel Application Development Cookbook
- 計(jì)算機(jī)通信網(wǎng)絡(luò)安全
- RestKit for iOS
- 物聯(lián)網(wǎng),So Easy!
- Hands-On Reactive Programming in Spring 5