Angular directive for making forms out of JSON Schema
This directive is using JSON Editor internally to generate forms.
-
Install via Bower
bower install --save-dev schema-form -
Include
mohsen1.schema-formin you appangular.module('myApp', ['mohsen1.schema-form']) -
Pass your JSON Schema to
json-schema-formattribute directive on<form>element<form schema-form="{type: 'string'}" action="/" method="post"> <button type="submit">Send</button> </form>
You can also use
ng-modelwith this directive.Note that
schema-formwillprependgenerated form elements.
Install Gulp via npm if you don't have it
npm install -g gulpgulp: build and test the projectgulp build: build the project and make new files indistgulp serve: start a server to serve the demo page and launch a browser then watches for changes insrcfiles to reload the pagegulp test: run testsgulp serve-test: runs tests and keep test browser open for development. Watches for changes in source and test files to re-run the tests
MIT