Angular

Angular documentation

docs

Official Angular docs (components, templates, DI, routing).

Quickstart (Angular CLI)

bash
npm i -g @angular/cli
ng new my-app
cd my-app
ng serve

Project setup (standalone mindset)

text
Prefer standalone components + route-based composition.
Keep shared UI in libs/ or a shared folder.

Standalone component

typescript
import { Component } from "@angular/core";

@Component({
  standalone: true,
  selector: "app-hello",
  template: `<h1>{{ title }}</h1>`,
})
export class HelloComponent {
  title = "Hello";
}

Iteration (*ngFor)

typescript
import { Component } from "@angular/core";

@Component({
  standalone: true,
  selector: "app-list",
  template: `<ul><li *ngFor="let x of xs">{{ x }}</li></ul>`,
})
export class ListComponent {
  xs = ["a", "b", "c"];
}

Inputs

typescript
import { Component, Input } from "@angular/core";

@Component({
  standalone: true,
  selector: "app-title",
  template: `<h1>{{ title }}</h1>`,
})
export class TitleComponent {
  @Input() title = "";
}