Angular version of the insanely cool jsoneditor
You can get it from Bower
bower install bearmini-ng-jsoneditor
This will copy the ng-jsoneditor.js files into a
bower_components folder, along with its dependencies. Load the script files in your application:
Add the 'bearmini.jsoneditor' module as a dependency to your application module:
var myAppModule = angular;
Finally, add the directive to your html:
Working with ng-model
Any changes to Jsoneditor or ng-model are reflected instantly.
editor.get() now you can simply access your
$scope.obj.data in this case, to get or set values.
If you would to get and set your JSON data as text (instead of JSON Objects), then you can set
prefix-text="true" like this:
There are some additional options specific to ng-jsoneditor only.
expanded: can be set to either
false to have Jsoneditor fully expanded or collapsed by default.
Forked from https://github.com/angular-tools/ng-jsoneditor
The Artistic License 2.0: see LICENSE.md