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

**Code:** `NG0100` · **Category:** Angular · **Seen on:** Angular

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/angular/ng0100-expressionchangedafterithasbeencheckederror)
