My Blog

Menu

Create Module

Posted: November 24, 2021. | By: Admin

Modules are used in Angular Js to put logical boundaries in your application. Hence, instead of coding everything into one application, you can instead build everything into separate modules to separate the functionality of your application. Angular Module contains multiple components to separate the functionality of application.

app.module.ts:

            It is Bootstrap loading for our Application.

  • The import statement is used to import functionality from the existing modules. Thus, the first 3 statements are used to import the NgModule, BrowserModule and AppComponent modules into this module.
  • The NgModule is used to define the imports, declarations, and bootstrapping options.
  • The BrowserModule is required by default for any web based angular application.
  • The bootstrap option tells Angular which Component to bootstrap in the application.
  • The providers array is used to define the services to load in your page.
  • The declarations array is used to define the Components to load current your page.

Example:

import { NgModule }      from '@angular/core'; 

import { BrowserModule } from '@angular/platform-browser'; 

import { AppComponent }  from './app.component'; 

import { AppService }  from './app.service'; 

 

@NgModule ({

   imports:      [ BrowserModule ],

   declarations: [ AppComponent ],

   providers:      [AppService],             

   bootstrap:    [ AppComponent ]

})

export class AppModule { }

About

Aapthi Technologies,Hyderabad offers a complete range of web solutions including web designing, developing, web hosting, Internet marketing and many more. With our electrifying presence, we have swirled the scenario of web solutions. We consistently invigorate our skill-set and tech-expertise and work with a high-level of integrity. Our keen-eye on emerging trends of online business as well as technical spheres has empowered us to render the most innovative solutions. Persistent development is the key drive of Aapthi Technologies, be it in terms of infrastructure, skill-set or technology. Team Aapthi Technologies, is fully committed to render back hundred percent value for the money paid by client.

Social Links

Our Bunker

Plot No -596, Near Reliance Fresh,
Vivekananda nagar colony, Kukatpally,
Hyderabad - 500072, India.