Skip to content

ExpressionChangedAfterItHasBeenCheckedError doesn't give enough context #17887

@nertzy

Description

@nertzy

I'm submitting a ...


[ ] Regression (behavior that used to work and stopped working in a new release)
[ ] Bug report 
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Today when I upgrade my application I see this in my console:

Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.

Expected behavior

More information should be provided, such as which element, attribute, and expression the error applies to. Something like:

Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'. Component <my-component>. Attribute [foo]. Expression "bar + 1".

What is the motivation / use case for changing the behavior?

This is so that developers can understand what part of a complex application code base is causing the issue.

Please tell us about your environment


Angular version: 4.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions