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
Binding value didn't update after asynchronous change #16343
Comments
Observable subscriptions are not executed in the Angular zone, please try: this.authService.onAuthStateChange.subscribe((isAuth) => ngZone.run((isAuth) => {
// your original code
})); |
Hi @vicb, thanks for reply I know about solution with ngZine.run, but for me it looks like overkill.
Also I want to notice, that I use the same idea with Rx/Subject in another place, it works as expected
Can you please clarify why it happens? Thank you, |
@montylab i guess it's because you emit new value inside of |
I'm facing same problem. Have to call Same code was working fine until update to v4+. |
Thank you all, I'll close the ticket |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a
I saw similar issue here: #7381
But it doesn't helped me, since current angular version isn't using babel
Current behavior
After asynchronous function is called, variable changes to true, but *ngIf doesn't showing up the item
After 5-30 seconds it detect variable change and showing item
Expected behavior
After asynchronous function is called, variable changes to true => *ngIf should showing up the item instantly
Minimal reproduction of the problem with instructions
https://angular-binding-bug.firebaseapp.com/ - demo
https://github.com/montylab/angular2_cd_bug
LI doesn't showing up after isAuth changed to true
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Windows 10, PHP Storm, npm, ng cli serve
The text was updated successfully, but these errors were encountered: