What is a module, and what does it contain?

Technology CommunityCategory: AngularWhat is a module, and what does it contain?
VietMX Staff asked 3 years ago

An Angular module is set of Angular basic building blocks like component, directives, services etc. An app can have more than one module.

A module can be created using @NgModule decorator.

@NgModule({
  imports:      [ BrowserModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }