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]
})

 
Posts created 26

Leave a Reply

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

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top
Optimized with PageSpeed Ninja