Skip to content

Angular Modules

Note

Angular Modules are containers with different purposes

Create a module:

ng generate module <module-name>
module-name.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

@NgModule({
  imports:      [ BrowserModule ],
  providers:    [ Logger ],
  declarations: [ AppComponent ],
  exports:      [ AppComponent ],
  bootstrap:    [ AppComponent ]
})
export class <module-name> { }