Open
Description
So we can work towards a common goal I'd like to discuss how exactly the Json Schema Builder should be used / called / included.
I created a small "Basic Usage" example based on the Angular Schema Form Example.
As I see it, it should be enough to just have a $scope.schema and a $scope.form (and an optional $scope.options) object for passing & receiving data, right?
Here's what I think it could look like (from my fork)
First, expose your (existing) schema and form to the $scope.
angular.module('myModule', ['schemaFormBuilder'])
.controller('FormBuilderController', function($scope) {
// JSON Schema
// add an existing schema to edit it
// or leave blank to create a new form
$scope.schema = {};
// Schema Form Defintion
// add an existing form definition for editing
// or leave blank to create a new form
$scope.form = [];
});
Then load them into the Schema Form Builder using the sfbSchema
and sfbForm
directives.
<div ng-controller="FormBuilderController">
<div sfb-schema="schema" sfb-form="form"></form>
</div>
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels