- Get link
- X
- Other Apps
What are the modules?
In Angular, a module is a mechanism to group components, pipes, directives, and services that are connected, in such a technique that can be merged with other modules to create an application.
A Basic Use of Module
Boostrap and Application
Modules we have to be able to use the decorator NgModule.
There are two types of modules, root modules, and features modules.
In the same technique that in a module we have one root component and many probable secondary components, In an application, we only have one root module and zero or many features modules. To be able to bootstrap our application, Angular require to know which one is the root module.
Boostrap and Application
To bootstrap our module build application, we need to notify Angular which one is our root module to perform the compilation in the browser. This compilation in the browser is also well known as "Just In Time"(JIT) Compilation.
import { platformBrowsweDynamic } from '@angular/Platform-browser-dynamic':
import { AppModule } from './app/app.module';
platformBrowsweDynamic().boostrapModule(AppModule);


Comments
Post a Comment