Angular 2 [PART-3] Module

Module
In Angular, a module is a mechanism to group components, directives, pipes and services that are related, in such a way that can be combined with other modules to create an application.

by default it is my-app/src/app/app.module.ts

Module contain
Import statement


import { NgModule } from '@angular/core'; //Import statement

@NgModule({
  declarations: [
    AppComponent   //Declare components here
  ],
  imports: [
    BrowserModule,DataTableModule // Import all modules
  ],
  providers: [],
  bootstrap: [AppComponent]
})

 

Leave a Reply

Your email address will not be published. Required fields are marked *