JSFiddle - React, Tailwind, and code Playground
by barakedry
HTML
<link rel="stylesheet" href="https://rawgit.com/barakedry/object-editor/master/object-editor.css">
<script src="https://rawgit.com/barakedry/object-editor/master/object-editor.js"></script>
<div ng-controller='MyCtrl'>
<object-editor object='myObject'></object-editor>
<!-- data-binding works as expected -->
<label>myObject.subObject.child.string:</label>
<input type='text' ng-model='myObject.subObject.child.string'/>
</div>
JavaScript
var myApp = angular.module('myApp',['objectEditor']);
function MyCtrl($scope) {
$scope.myObject = {
string: "some string",
number: 150,
bool: false,
array: [20, 'a', false, {key: "val"}],
subObject: {
child: {
string: "some string"
}
}
};
}