Description #
Angular is a full-featured, component-based web application framework developed and maintained by Google. It allows developers to build dynamic, scalable single-page applications (SPAs) using TypeScript, HTML, and CSS, with built-in support for routing, forms, and state management.
History #
Angular (often referred to as Angular 2+) was released in 2016 as a complete rewrite of the original AngularJS (2010). It was developed by the Angular Team at Google to address performance and maintainability issues in large-scale applications. Today, Angular powers enterprise apps and progressive web applications around the world.
Hello World Code #
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: '<h1>Hello, World!</h1>',
})
export class AppComponent {}
To run this code, you’d place it inside an Angular component and render it via the root module.
How to Run #
Option 1: Online
Option 2: Local
Install Angular CLI:
npm install -g @angular/cli
Create a new project:
ng new hello-world
cd hello-world
ng serve
Edit app.component.ts
to include the Hello World code
Key Concepts #
- Component-based architecture
- TypeScript-first framework
- Two-way data binding
- Dependency injection
- Built-in router and forms support
- Ahead-of-Time (AOT) compilation
- RxJS for reactive programming
- CLI tools for scaffolding
- Unit testing with Jasmine and Karma
- Enterprise-scale structure and best practices
Try It Online #
Fun Facts #
- Angular is used by Google, Microsoft, and many Fortune 500 companies.
- AngularJS (v1) and Angular (v2+) are two distinct frameworks.
- Angular supports internationalization and accessibility out of the box.