This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

NgModule

npm Package @angular/core
Module import { NgModule } from '@angular/core';
Source core/src/metadata/ng_module.ts

Metadata Overview

      
      @NgModule({ 
  providers?: Provider[]
  declarations?: Array<Type<any> | any[]>
  imports?: Array<Type<any> | ModuleWithProviders | any[]>
  exports?: Array<Type<any> | any[]>
  entryComponents?: Array<Type<any> | any[]>
  bootstrap?: Array<Type<any> | any[]>
  schemas?: Array<SchemaMetadata | any[]>
  id?: string
})
    

Description

NgModule decorator and metadata.