bvaughn/angular-form-for

Support for asynchronous schemas

Opened this issue · 2 comments

I am trying to generate a form based on a schema that I retrieve asynchronously (promise-based).
However, angular-form-for does not seem to detect the change, and instead renders a blank form.
Am I missing something, or is this not implemented yet?

Reproduction codepen here.

A partial workaround to this issue would be adding an ng-if directive to the form, and setting the flag to true when the data is ready. However, it seems that once the initial schema is set, there is no way of dynamically updating it.

form-for expects the schema object to be fully loaded before being set. Dynamic schemas aren't supported.

I am happy to leave this issue open as a feature-request if anyone (perhaps you?) would be interested in contributing a PR but I will not have the time to do it. :)