Tutorials Logic, IN +91 8092939553 info@tutorialslogic.com
Navigation
Home About Us Contact Us Blogs FAQs
Tutorials
All Tutorials
Services
Academic Projects Resume Writing Interview Questions Website Development
Compiler Tutorials

Introduction

Angular

Angular is a leading, powerful, and widely-used frontend framework for building single-page applications (SPAs). Built and maintained by Google, Angular is written in TypeScript and supports building mobile, desktop, and web applications. As of Angular 21 (released November 19, 2025), the framework features Signals as the primary reactive primitive, standalone components as the default, and zoneless change detection out of the box - making it faster and simpler than ever.

VersionReleased Date
AngularJS 1.xSeptember 2010 (original framework, now legacy)
Angular 2Released on September 14, 2016 (complete rewrite in TypeScript)
Angular 3Skipped - router package version misalignment
Angular 4Released on March 23, 2017
Angular 5Released on November 1, 2017
Angular 6Released on May 4, 2018
Angular 7Released on October 18, 2018
Angular 8Released on May 28, 2019
Angular 9Released on February 7, 2020
Angular 10Released on June 24, 2020
Angular 11Released on November 11, 2020
Angular 12Released on May 12, 2021
Angular 13Released on November 3, 2021
Angular 14Released on June 2, 2022
Angular 15Released on November 16, 2022
Angular 16Released on May 3, 2023
Angular 17Released on November 8, 2023
Angular 18Released on May 22, 2024
Angular 19Released on November 19, 2024
Angular 20Released on May 2025
Angular 21Released on November 19, 2025 (latest)

Benefits of Angular

  • Angular is a component-based framework that gives a clean, scalable structure for applications.
  • It has declarative templates with lots of reusable code and built-in control flow syntax.
  • Angular is written in TypeScript, providing strong typing and excellent tooling support.
  • Signals provide a simple and efficient reactive state model, replacing the need for Zone.js.
  • Standalone components eliminate the need for NgModules in new applications, simplifying the architecture.
  • Zoneless change detection (default in Angular 21) improves performance and reduces bundle size.
  • Built-in accessibility support via the @angular/aria package.
  • Angular code is highly testable, with Vitest as the default test runner in Angular 21.

Angular CLI

The Angular CLI is a command-line interface tool that helps you initialize, develop, scaffold, and maintain Angular applications. In Angular 21, running ng new my-project creates a standalone application by default - no NgModule required. You can use the CLI directly in a terminal or through an interactive UI such as Angular Console.

Step 1:- To start with creating an Angular CLI application, first install Node.js (version 20.19.0 or higher is required for Angular 21).

Step 2:- Install Angular CLI by running the below command-

Example

											npm install -g @angular/cli
											

Step 3:- Now, to create an Angular application, just run the below command-

Example

											ng new my-project // To create an angular applicaion
											cd my-project // Navigate to project folder i.e. my-project
											ng serve // To run the applicaion
											

Our newly created app will look like below (Angular 21 - Default Project Structure):-

Angular 21 - Default Project Structure

											import { Component } from '@angular/core';
											
											@Component({
												selector: 'app-root',
												templateUrl: './app.component.html',
												styleUrls: ['./app.component.css']
											})
											
											export class AppComponent {
												title = 'my-first-project';
											}
											

											
											<div style="text-align:center">
											    <h1>Welcome to {{ title }}!</h1>
											</div>
											

											h1 {
												color: green;
											}
											

											import { BrowserModule } from '@angular/platform-browser';
											import { NgModule } from '@angular/core';
											import { AppComponent } from './app.component';
											
											@NgModule({
												declarations: [
												    AppComponent
												],
												imports: [
												    BrowserModule
												],
												providers: [],
												bootstrap: [
												    AppComponent
												]
											})
											
											export class AppModule { }
											

											import { TestBed, async } from '@angular/core/testing';
											import { AppComponent } from './app.component';
											
											describe('AppComponent', () => {
												beforeEach(async(() => {
													TestBed.configureTestingModule({
														declarations: [
														    AppComponent
														],
													}).compileComponents();
												}));
												
												it('should create the app', () => {
													const fixture = TestBed.createComponent(AppComponent);
													const app = fixture.debugElement.componentInstance;
													expect(app).toBeTruthy();
												});
												
												it(`should have as title 'my-first-project'`, () => {
													const fixture = TestBed.createComponent(AppComponent);
													const app = fixture.debugElement.componentInstance;
													expect(app.title).toEqual('my-first-project');
												});
												
												it('should render title in a h1 tag', () => {
													const fixture = TestBed.createComponent(AppComponent);
													fixture.detectChanges();
													const compiled = fixture.debugElement.nativeElement;
													expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-first-project!');
												});
											});
											

Some important CLI commands:-

CommandAliasDescription
add-It adds support for an external library to our Angular CLI project.
buildbIt compiles an Angular application into an output directory named "dist". In Angular 21, production mode is the default - no --prod flag needed.
config-It retrieves or sets Angular application configuration values in the angular.json file for the workspace.
docdIt opens the official Angular documentation (i.e. angular.io) in a browser, and searches for a given keyword.
e2eeIt builds and serves an Angular application, then runs end-to-end tests.
generategIt will generate and/or modify files based on a schematic.
help-It will provide a list of available Angular CLI commands and their short descriptions.
lintlIt will run linting tools on our Angular app code in a given project folder.
newnIt will create a new workspace and an initial standalone Angular application (no NgModule by default in Angular 21).
run-It will run an architect target with an optional custom builder configuration defined in our Angular project.
servesIt builds and serves our Angular application. It also rebuilds on file changes.
testtIt will run unit tests in our Angular project (uses Vitest by default in Angular 21).
update-It updates our Angular application and its dependencies.
versionvTo see Angular CLI version.
xi18n-It will extract i18n messages from source code.

What's New in Angular 21

  • Zoneless by Default: Angular 21 uses zoneless change detection out of the box. Zone.js is no longer required for new applications.
  • Signal Forms (Experimental): A new form API built on Signals via the @angular/forms/signals package, offering better type safety and simpler validation.
  • Vitest as Default Test Runner: Vitest replaces Karma and Jasmine as the standard test runner for new Angular projects.
  • @angular/aria Package: A new package providing accessible component directives for common WAI-ARIA patterns.
  • HttpClient Auto-provided: HttpClient is now available in the root injector by default - no need to call provideHttpClient().
  • AI-First Tooling: Built-in MCP server and AI config generation for Claude, Copilot, Cursor, and Gemini.

Ready to Level Up Your Skills?

Explore 500+ free tutorials across 20+ languages and frameworks.