Closed brian-slate closed 5 years ago
I've also tried the Alpha builds (up to 1.0.0-alpha.4) with no luck.
As a test, I was able to paste the above schema and sample data into another angular json schema form directive (angular-json-schema-form) and it works as expected: https://azimi.me/angular-json-schema-form/demo/demo.html
angular-json-schema-form: https://github.com/mohsen1/angular-json-schema-form/
Looking forward to updates on this project, it's been great up to this point! 👍
@bmherold for whatever reason the original design of this project assumed the root to be an object for simplicity. You can read prior issue responses in this issue How to make array type schemas work without wrapping them inside an object type and this issue root array not rendered
If it looks at any point like I could do it easily without breaking everything else I will do it, but I have too much on the TODO list to consider it at the moment unfortunately.
I intend to do some updates soon as I should have some time off to work on it soon while job hunting.
@Anthropic thanks for the prompt response! I'll take a look at the linked issues and maybe I can submit a PR in the meantime if you aren't able to get to it. Cheers 🍻
@bmherold I don't expect it to be easy enough till I finish some of the re-write stuff I am working on, it really is embedded and hard to work on at the moment unfortunately.
Array type schemas do not render, nor populate with model data.
Expected behaviour
I expected this schema to render:
Actual behaviour
It actually does nothing. I can pull out the nested schema under 'items' which renders fine and populates with data.
Gist/Plunker/Demo
With array schema (doesnt work): https://plnkr.co/edit/QvCijZcoV7BV4RU9m2cz?p=preview Pulling nested schema out of items to simple object schema: https://plnkr.co/edit/n1bQwjmCOF10KKogAtFg?p=preview