Skip to content

Troubleshooting

Every entry follows the same structure so you can scan it quickly during an incident:

  1. Symptom — the exact message or observable behaviour.
  2. Cause — what Angular is actually complaining about.
  3. Diagnosis — how to confirm it in your own code.
  4. Fix — the concrete change.
  5. Prevention — how to stop it from coming back.

CodeMessagePage
NG0100ExpressionChangedAfterItHasBeenCheckedErrorRuntime errors
NG0200Circular dependency in DIDI errors
NG0201No provider for XDI errors
NG0203inject() must be called from an injection contextDI errors
NG0301Export not foundRuntime errors
NG0500–NG0505Hydration mismatchSSR common issues
NG0750@defer requires standalone dependenciesRuntime errors
NG0912Component ID generation collisionBuild & tooling
NG0955Duplicate keys in @for trackRuntime errors
NG0956Tracking expression caused re-creation of the entire collectionRuntime errors
NG02200Cannot find a differRuntime errors
NG04002Cannot match any routesRuntime errors
NG05104Root element was not foundBuild & tooling

What you observeLikely area
The view does not update after data changesChange detection
The app becomes slower the longer it runsMemory leaks
The list re-renders completely on every updateRuntime errors — track
API calls fire twiceSSR common issues
A stale HTTP response overwrites a newer oneRxJS patterns
Build succeeds locally but fails in CIBuild & tooling
Bundle size exploded after a small changeBuild & tooling

Angular error codes link to angular.dev/errors/NGxxxx. Always read that page first — it is short and precise.

The browser extension gives you:

  • Component tree with current inputs, outputs and signal values.
  • Profiler showing which component triggered each change detection cycle and how long it took.
  • Injector tree, invaluable for NG0201 and NG0200.
// Select a DOM node in the Elements panel, then:
ng.getComponent($0); // Component instance
ng.getContext($0); // Template context (e.g. @for item)
ng.getOwningComponent($0); // Parent component
ng.applyChanges(ng.getComponent($0)); // Force change detection

When the cause is unclear, bisect:

  1. Comment out half of the template.
  2. Replace real data with a hardcoded literal.
  3. Remove OnPush temporarily — if the problem disappears, it is a change detection issue.
  4. Remove provideClientHydration() temporarily — if it disappears, it is a hydration issue.