Simple json explorer angular directive that uses raw json data as source.
This module is based in the firefox jsonview extenrsion made by Ben Hollis: https://github.com/bhollis/jsonview/
Check the demo folder (demo/demo.html) for examples.
bower install ng-json
angular
.module('app', ['ngJsonExplorer'])
Files to be used in production are located in the folder "ng-json-explorer/dist"
<script src="angular-json-explorer.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="angular-json-explorer.css" />
$scope.data = {
'name': 'Json Explorer',
'qty': 10,
'has_data': true,
'arr': [
10,
'str',
{
'nested': 'object'
}
],
'obj': {
'hello': 'world'
}
};
<json-explorer json-data="{{data}}"></json-explorer>
<json-explorer json-url="http://myurl.com"></json-explorer>
<json-explorer json-data="{{data}}" collapsed="true"></json-explorer>