adampenn / Angular7-json-schema-form

Angular v7 for Angular2-json-schema-form
MIT License
5 stars 7 forks source link

Json Schema gives error with FROM in it #7

Closed Nagenderr2Code closed 5 years ago

Nagenderr2Code commented 5 years ago

Describe the bug which template:

A clear and concise description of what the bug is. I have followed the steps provided in the documentation and it still loads blank page.

To Reproduce Steps to reproduce the behavior:

  1. Follow the documentation in angular 7

Note: As I am new to angular I am suspecting that I might be doing some thing wrong. please correct me. app.module.ts

import { MaterialDesignFrameworkModule } from 'angular7-json-schema-form';

imports: [ BrowserModule, MaterialDesignFrameworkModule, ],

app.component.html <json-schema-form loadExternalAssets="true" [schema]="exampleURL" [debug]="true" framework="material-design" (onSubmit)="yourOnSubmitFn($event)">

app.component.ts import * as schema from 'src/assets/yourJsonSchema.json';

yourJsonSchema: any = schema; // this is how i am loading the schema.

yourJsonSchema = src/assets/yourJsonSchema.json; // tried this way as well

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Log output covering before error and any error statements

Insert log hereCopy

Additional context Add any other context about the problem here.

Detailed Description

Context

Possible Implementation

Nagenderr2Code commented 5 years ago

As provided in the example I have given the json schema with form in it. It is only rendering the exclude the form. In that case how to achieve the Tab .

"form": [ { "type": "help", "helpvalue": "

Tabbed Array Example

Tab arrays can have tabs to the left, top or right.

" }, { "key": "comments", "type": "tabarray", "add": "New", "remove": "Delete", "style": { "remove": "btn-danger" }, "title": "{{ value.name || 'Tab ' + $index }}", "items": [ "comments[].name", "comments[].email", { "key": "comments[].comment", "type": "textarea" } ] }, { "type": "submit", "style": "btn-default", "title": "OK" } ]

Nagenderr2Code commented 5 years ago

Its working now.. passed form as layout