Module
Modules are like containers for components, directives, services, etc. They help to organize an Angular application which makes it easier to manage or scale application. Modules also support lazy loading means it is used to improve application performance by loading specific parts of the application only when they are required. The root module also known as App Module provides a starting point for the application.
Javascript
// app.module.ts import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { AppComponent } from './app.component' ; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } |
What are the main building blocks of an Angular Application?
Angular is a widely used open-source front-end framework used to build dynamic web applications. It consists of several key building blocks that work together to create scalable, and maintainable applications. In this article, we will explore all the main building blocks of an Angular application and we will explore how they contribute to framework architecture.