Open emarkovskyi opened 6 years ago
Hmm... sorry seems 1.0... version and 2.0... versions have different package names But anyway on my end the example app does not start
In angular2-schema-form, the demo page consisted of two blank pages and a form test page with a text area for JSON input (schema) and an output of the current model (JSON). I think the author had little time and would certainly not be averse to a "community-based" solution.
The angular2-schema-form-demo has not been upgraded to work with ngx-schema-form 2+. But you can use the demo app as a decent demo: https://github.com/makinacorpus/ngx-schema-form/tree/master/src/app
I have updated the github.io branch: http://makinacorpus.github.io/ngx-schema-form/dist/ngx-schema-form/
Nice. I think it makes sense (e.g. for issues/bugs) to create a schema configuration, which can easily be added to the demo page to demonstrate a certain problem. Probably it would be exaggerated to encode the schema into the URL, but I have overlooked the possibility to change the schema overall. That's all I have to complain about - beside the array bug ;-)!
txs @ebrehault, maybe not related to the topic, but does the current state lib support validation? I have tried just "required", custom validation. I see in debugger that custom validaor is triggered but there is no any "has-errors" styles added? May I missed something?
@WhileTrueEndWhile maybe we could change the demo so it is able to get a schema from a Gist, then we would just need to pass the Gist url as a param.
@emarkovskyi yes it does support validation.
Check the demo, as mentioned in the schema, firstName is mandatory, if you empty it, you'll this error in the console log:
{code: "OBJECT_MISSING_REQUIRED_PROPERTY", params: Array(1), message: "Missing required property: firstName", path: "#/firstName", schemaId: undefined}
Looks fine so far...
The array bug seems to be fixed too :-)
The package.json contains "angular2-schema-form": "^1.0.0-beta.7" dependencies, https://github.com/fbessou/angular2-schema-form-demo