-
Notifications
You must be signed in to change notification settings - Fork 177
Data-only mode throws on init. #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mringer Check out my repo It does not run on StackBlitz yet: https://stackblitz.com/github/catull/angular2-json-schema-form-issue-287. Locally, it starts up nicely. This is the improvements I made.
Good luck. |
@catull thanks for the tip, sounds like this is something that should be wrapped by a service and provided by the a2-jsf module when it bootstraps. |
@mringer Either that, or there could be an initialisation hook that hands you an Something like this <json-schema-form
loadExternalAssets='true'
[(ngModel)]='exampleJsonObject'
initialise='initialise(ajv)'>
</json-schema-form> You would implement the method in your component initialise (ajv): void {
// ajv.addMetaSchema(.....);
// ajv.addSchema(.....);
// etc
} |
Sure, but this step really should be performed as part of the library's bootstrap, rather than having the library user perform additional configuration steps. Especially if it is something the library expects to perform it's baseline behavior. |
@mringer I have around 20 schemata, most of them are independent. A few reference one of the other schemata. All of them must be "spoon-fed" upfront to I do agree with you that all draft JSON schemata (v4, v5, v6, v7 and soon v8) MUST be registered with |
@catull super useful stuff. Thanks! I incorporated, your suggestion into my |
@mringer Allow me to suggest to switch to ng-json-schema-form, a fork by Shamoon Siddiqui He announced to carry on with Shamoon has already incorporated one PR in his fork, and released a new version, see https://www.npmjs.com/package/ng-json-schema-form |
fair enough, thanks for the heads up. |
Uh oh!
There was an error while loading. Please reload this page.
Issue type
I'm submitting a (check one):
[x] Bug report
[ ] Feature request
[ ] Regression (something that used to work, but stopped working in a newer version)
[ ] Support request
[ ] Documentation issue or request
Prerequisites
Before posting, make sure you do the following (check all):
[x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not)
[x] Search GitHub for a similar issue or PR
[x] If submitting a Support request, also search Stack Overflow for similar issues
Note: Please cross-post GitHub support requests to Stack Overflow, and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.
Current behavior
Using the configuration provided in the documentation creating a "Data Only" with no schema or layout defined throws.
Expected behavior
Expect a form to be created mirroring the JSON doc provided as input.
IMPORTANT: How can we reproduce your problem?
Environment
OS name & version: OS X 10.13.4
Browser name & version: Chrome 66.0.3359.181
Angular version: 5.1.0
Angular JSON Schema Form version(s): 0.7.0-alpha.1
Other relevant software or packages:
Any other relevant information
The text was updated successfully, but these errors were encountered: