The exception appears (in the development mode) at the moment the value is checked and value is different of the updated value.
AppComponent.html:1 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: true'. Current value: 'ngIf: false'.
at viewDebugError (core.js:20440)
at expressionChangedAfterItHasBeenCheckedError (core.js:20428)
at checkBindingNoChanges (core.js:20530)