Yes, I already have (changes) on all the inputs. The problem is I need the initial form state to emit once all of the values are populated. This isn't the case within ngOnInit. When I check form.valid in ngOnInit, I'm definitely seeing the wrong state. If I console.log in afterview, I see it get updated to the correct state.
On Wednesday, May 17, 2017 at 7:53:49 PM UTC-7, Sander Elias wrote: > > Hi Jonathan, > > You can't use the afterview* lifecycle hooks to make any changes that > affect your view's data. Do that in the ngOnInit, or any of the other > places. > I assume you have a 3rth party that changes something in your data when it > initialises? Try listening to the event it triggers, and hook into that. On > an input you would do something like: > > <input ... (changes)="fireValidEvent()"> > > I'm pretty sure, your problem can be solved that way. > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
