Open AndrewIsh opened 8 years ago
@AndrewIsh does a scope.$apply();
not wait for it to complete?
@Anthropic I'm not sure how this would be implemented. If I'm sending a schemaFormValidate
broadcast, that's a fire and forget. I'm not sure I understand how scope.$apply()
could be used in this context. Apologies if I'm being dim ;-)
Enhancement
Sending the 'schemaFormValidate' broadcast prompts a validation of the form. However, if you then want to perform an action dependent on the form's $valid property immediately after the validation, there is no way of knowing when the validation is complete. This can lead to a race condition whereby the testing of the form's $valid property occurs before the validation is complete.
Expected behaviour
Either prompting form validation should be done via a method call that returns a promise or, maybe, upon form validation, ASF should send a broadcast announcing the fact.
@json-schema-form/angular-schema-form-lead