Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(common): remove WrappedValue from AsyncPipe #36633

Closed
wants to merge 1 commit into from

Commits on Apr 29, 2020

  1. refactor(common): remove WrappedValue from AsyncPipe

    `AsyncPipe` only uses `WrappedValue` when the latest value from the `Promise` or `Observable` is different from the previous one. This is already enough to trigger change detection so the `WrappedValue` is not necessary.
    
    Fixes angular#29927
    
    BREAKING CHANGE:
    This change could result in ExpressionChangedAfterItHasBeenChecked errors that
    were not detected before. The error could previously have gone undetected
    because two WrappedValues are considered "equal" in all cases for the purposes
    of the check, even if their respective unwrapped values are not.
    
    Additionally, `[val]=(observable | async).someProperty` will no longer
    trigger change detection if the value of `someProperty` is identical to
    the value in the previous emit. If you need to force change detection,
    either update the binding to use an object whose reference changes or
    subscribe to the observable and call markForCheck as needed.
    atscott committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    4ad18f1 View commit details
    Browse the repository at this point in the history