Released · improving
Framework · Since 2016
Angular is a TypeScript-based web framework led by Google, with routing, forms and HTTP built in for building large, maintainable web applications.
Angular is a front-end framework for building web applications in TypeScript. It was first released in 2016 and is developed in the open by the Angular team at Google. Despite the shared name, it is a different framework from AngularJS, which dates back to 2010. You build the UI from components, each made of a template and a TypeScript class, track changing state with signals, and share common logic through services provided by dependency injection.
Because the router, forms, HttpClient, internationalization and testing utilities all ship as official packages, Angular is a popular choice for large business applications and admin interfaces that many teams maintain over years. Its consistent structure and code generators mean that Angular projects tend to look alike, so new developers can find their way around quickly. Server-side rendering and static site generation are supported with the same tooling.
The fastest way to start is to install Node.js, create a project with the Angular CLI and run the development server with ng serve. The official site, angular.dev, offers an interactive tutorial that runs in the browser as well as in-depth guides for each topic. A basic understanding of TypeScript helps a lot, since Angular code is built from classes, types and decorators.
Each component imports the components and directives it uses directly, so you can split the UI into small, self-contained pieces without extra modules.
Declare state and derived values with signal, computed and effect, and Angular tracks exactly what changed to update only the affected parts of the page.
The router, reactive forms, HttpClient, internationalization and server rendering are official packages, so you spend less time choosing core libraries.
The Angular CLI handles project setup, code generation, the dev server, tests and optimized production builds in one consistent workflow.
The Angular CLI runs on Node.js. Install an LTS release from nodejs.org and confirm that node and npm report their versions. The supported Node.js versions are listed in the version compatibility table on angular.dev.
node --version && npm --versionInstall the Angular CLI globally with npm. This gives you the ng command; run ng version to see what was installed.
npm install -g @angular/cliCreate a new project with ng new and start the dev server. After you answer the prompts about the stylesheet format and SSR, the app opens at http://localhost:4200.
ng new my-app && cd my-app && ng serve --openThe @Component decorator turns a class into a component, a piece of the UI. The selector is the tag name used in HTML, {{ }} in the template displays a value, and (click) binds an event to a method. A signal is read by calling it like a function and changed with update; when it changes, Angular refreshes the view automatically.
src/app/app.ts
import { Component, signal } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>Hello, {{ name() }}!</h1>
<button (click)="increment()">Clicked {{ count() }} times</button>
`,
})
export class App {
protected readonly name = signal('Angular');
protected readonly count = signal(0);
increment() {
this.count.update((value) => value + 1);
}
}
npm install -g @angular/cli
ng new hello-angular
cd hello-angular
ng serve --openSix chapters that take you from installation to the core ideas of Angular.
Ask questions, share experience and trade opinions about Angular.
No discussions yet. Start the first one.
0 comments
Sign in · Sign in to leave a comment.
Be the first to comment.