WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Angular 4 Modules


Simply module refer to place but components, directives, pipes, and services, which are related to the application


Modules can be used in website, the header, footer, left, center. Let's we can start to create NgModule. you can edit a new project using the Angular –cli command
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

@NgModule({
   declarations: [
      AppComponent
   ],
   imports: [
      BrowserModule
   ],
   providers: [],
   bootstrap: [AppComponent]
})

export class AppModule { }

The NgModule must to be imported as blow −
import { NgModule } from '@angular/core';
other ngmodule
@NgModule({
   declarations: [
      AppComponent
   ],
   imports: [
      BrowserModule
   ],
   providers: [],
   bootstrap: [AppComponent]
})

Import

If you are using modules you must know the components in the Declaration array.
imports: [
   BrowserModule,
   FormsModule
]

Bootstrap

This includes the main app component for starting the execution.

Declaration

Declaration mean part of components array .