Angular: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked

A template value changed during the same change-detection cycle in which Angular already checked it (dev-mode only error).

Exact message you may see Expression has changed after it was checked
Seen on: Angular

Meaning

Usually caused by updating bound state in ngAfterViewInit/ngAfterContentInit, a child modifying parent state during rendering, or getters returning new values each time.

Common causes

  • Changing bound state in ngAfterViewInit
  • Child component/directive updating parent during check
  • Getter/method in template returning a new value each call
  • Async value resolved synchronously in a lifecycle hook

⚡ Quick fix

  1. Move the update to ngOnInit or make it async (setTimeout/Promise.resolve)
  2. Use signals/observables with async pipe
  3. Avoid non-deterministic getters in templates

Detailed fix by platform

TypeScript

  1. typescript
    ngAfterViewInit() {
      queueMicrotask(() => this.loading = false);   // next tick, not mid-check
    }

How to diagnose

  1. Binding — Previous/current values in the message
  2. Hook — Which lifecycle method changes it?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot find control with name — Angular: Error: Cannot find control with name: 'email' (reactive forms) (Angular)Cannot find control w…NG0500 — Angular SSR: NG0500: During hydration Angular expected <div> but found <span> (NG0501, NG0502) (Angular)NG0500NG0600 — Angular: NG0600: Writing to signals is not allowed in a computed or an effect by default (Angular)NG0600NG0955 — Angular: NG0955: The provided track expression resulted in duplicated keys for a given collection (@for) (Angular)NG0955NG8002 — Angular: NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input' (Angular)NG8002NullInjectorError — Angular: NullInjectorError: No provider for X! (Angular)NullInjectorErrorTS2564 — TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor (TypeScript)TS2564ViewChild is undefined — Angular: TypeError: Cannot read properties of undefined (reading 'nativeElement') — @ViewChild used in ngOnInit (Angular)ViewChild is undefinedNG0100

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.