Understand NgModule in 15 mins | by Bytecode Pandit
NgModule is really a very important concept of angular. And it helps to wire-up some important information for the compiler during run time. They are specially used for organizing the code into features, lazy loading routes, and creating reusable libraries. We're going to cover some important uses of NgModule with some examples. I assume you have some working knowledge of Angular. JavaScript Modules I want to clear that NgModules are completely different from modules in javascript (sometimes called ES6 module). They are simply a language construct that helps us to organize our code. For more information pls visit Javascript Modules Let's dive into NgModule, the AppModule. Let's start looking at a basic NgModule that exists in every Angular application i.e AppModule import { BrowserModule } from '@angular/platform-browser' ; import { NgModule } from '@angular/core' ; import { AppComponent } from './app.component' ; @ NgModule ( { ...