Working with NgModules

In the preceding section, we used a module named AppModule to bootstrap our Angular application. The AppModule is in the web/frontend/app.module.ts file and its content looks as follows:

import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { CommonModule } from "@angular/common"; import { AppRoutingModule } from "./app-routing.module"; import { AppComponent } from "./app.component"; import { LayoutModule } from "./config/layout.module"; import "../../node_modules/bootstrap/scss/bootstrap.scss"; import "./app.scss"; @NgModule({ bootstrap: [AppComponent], declarations: [AppComponent], imports: [ BrowserModule, CommonModule, AppRoutingModule, LayoutModule ] }) export ...

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.