What is Angular?
Angular is an open-source JavaScript framework developed by Google, designed for creating dynamic web applications, especially SPA (Single Page Applications).
Angular is built on TypeScript, uses powerful component, directive, service and module system.
Key Angular Features
- TypeScript — strict typing and JavaScript extensions.
- MVVM architecture — separation of logic, view and state.
- Component approach — interface is built from reusable components.
- Dependency injection — built-in mechanism for managing dependencies.
- Routing — navigation between pages without reload.
- RxJS — reactive programming with Observables.
- CLI — powerful Angular CLI for code generation, building and testing.
- Universal rendering — SSR support (Angular Universal).
What Can You Do with Angular?
- Creating single-page applications (SPA).
- Developing enterprise solutions with modular architecture.
- Building progressive web applications (PWA).
- Integration with REST and GraphQL API.
- Working with forms, validation, animations and localization.
Simple Component Example
import { Component } from '@angular/core';
@Component({
selector: 'app-hello',
template: `<h1>Hello, {{ name }}!</h1>`,
})
export class HelloComponent {
name = 'Angular';
}
<!-- somewhere in HTML -->
<app-hello></app-hello>
Angular vs React vs Vue
| Characteristic | Angular | React | Vue |
|---|---|---|---|
| Type | Framework | Library | Framework |
| Language | TypeScript | JavaScript + JSX | JavaScript + templates |
| Learning curve | Medium / high | Low / medium | Low |
| Architecture | MVVM, modular | View-only, declarative | MVVM |
| Corporate support | Meta (Facebook) | Alibaba, Individual |
Interesting fact:
Angular is second generation. Previously AngularJS (v1.x) existed, which is not compatible with new version (v2+).