The hidden gotcha with async in Angular forms
In this video, we talk about some of the gotchas and pitfalls to using OnPush Change Detection and Reactive Forms in Angular. This includes dealing with an async validator and changing the status of forms as the result of an asynchronous operation.
Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076
Learn Angular with Ionic: https://ionicstart.com
Source code: https://github.com/joshuamorony/angular-onpush-reactive-forms
- Previous OnPush Change Detection video: https://www.youtube.com/watch?v=tWy8zaWvkvk
- Should we really NEVER subscribe in Angular apps?: https://www.youtube.com/watch?v=WvMxnGfqEis
0:00 Introduction
0:41 Recap of OnPush CD
1:33 Async Validator Example
3:19 Solving with the async pipe
4:34 Other problems with async
6:15 Using ChangeDetectorRef
7:17 The trick
10:03 Conclusion
#rxjs #angular
- More tutorials: https://eliteionic.com
- Follow me on Twitter: https://twitter.com/joshuamorony