PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Angular · Theory

Signals

← All stacks

Theory

28/43

Signals

A signal is a value Angular tracks. count = signal(0). Read count() in the template. Update with count.set(1) or count.update(n => n + 1). Don’t do count().n++ on an object — replace or use update.

Board: click +1. Template shows the new number. Trap: treating a signal like a plain variable and mutating the inner array without notifying.

Exam tip

signal(0) + update. No silent mutate.

Example

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

@Component({
  selector: "app-root",
  template: `
    <h1>{{ title }}</h1>
    <button (click)="toggle()">Toggle</button>
    <p *ngIf="open">Panel open</p>
  `,
})
export class AppComponent {
  title = "Angular practice";
  open = true;
  toggle() {
    this.open = !this.open;
  }
}

Signals: toggle open. Say whether the panel is on screen after one click.

Short notes

  • DefTracked value. Read (), write set/update.
  • RuleDon’t mutate inner objects silently.
  • Exclick counter.

Questions

1

How do you change a signal?

Previous← Control FlowNextChange Detection →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.