angular/angular · error · RuntimeError
EXPRESSION_CHANGED_AFTER_CHECKED
EXPRESSION_CHANGED_AFTER_CHECKED
Error message
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for '${propName}': '${formatValue(oldValue)}'. Current value: '${formatValue(currValue)}'. What it means
Error "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for '${propName}': '${formatValue(oldValue)}'. Current value: '${formatValue(currValue)}'." thrown in angular/angular.
Source
Thrown at packages/core/src/render3/errors.ts:85
oldValue: any,
currValue: any,
propName: string | undefined,
lView: LView,
): never {
const hostComponentDef = getDeclarationComponentDef(lView);
const componentClassName = hostComponentDef?.type?.name;
const field = propName ? ` for '${propName}'` : '';
let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${formatValue(
oldValue,
)}'. Current value: '${formatValue(currValue)}'.${
componentClassName ? ` Expression location: ${componentClassName} component` : ''
}`;
if (creationMode) {
msg +=
` It seems like the view has been created after its parent and its children have been dirty checked.` +
` Has it been created in a change detection hook?`;
}
throw new RuntimeError(RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED, msg);
}
function formatValue(value: unknown): string {
let strValue: string = String(value);
// JSON.stringify will throw on circular references
try {
if (Array.isArray(value) || strValue === '[object Object]') {
strValue = JSON.stringify(value);
}
} catch (error) {}
return strValue.length > VALUE_STRING_LENGTH_LIMIT
? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + '…'
: strValue;
}
function constructDetailsForInterpolation(
lView: LView,View on GitHub (pinned to 51cb07e980)
Solutions
- Update the bound value before change detection (e.g. in ngOnInit) or defer the update with setTimeout/signals.
When it happens
Trigger: Thrown at packages/core/src/render3/errors.ts:85 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of angular/angular@51cb07e980 (2026-08-22).
Data as JSON: /api/errors/bc1ae855273fc45e.
Report an issue: GitHub.