Skip to main content

Posts

Showing posts with the label export module

Angular 2 @NgModel [Purpose Of Root Module & Export Module]

The @ NgModule is a new decorator. This module is recently added in Angular 2. The @ NgModule is a class and work with the @ NgModule decorator function. @NgModule takes a metadata object that tells Angular “ how to compile and run module code ”. The @NgModules page guides you from the most elementary @NgModule to a multi-faceted sample with lazy modules. Stayed Informed   –   Angular 2 vs. Angular 1 Stayed Informed  -  Angular 4 vs. Angular 2 The @NgModule main use to simplify the way you define and manage the dependencies in your applications and using @ NgModule you can consolidate different components and services into cohesive blocks of functionality. The Basic Example of @NgModule as, @ NgModule({ imports : [BrowserModule], declarations : [YourComponent], bootstrap : [YourComponent] }) class YourAppModule {} The @NgModule is a way to organize your dependencies for 1.       Compile...