Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5d90d8f
Initial commit
Oct 12, 2013
6df9175
first commit
Oct 12, 2013
5c73e21
a
Oct 12, 2013
bde0328
docs
Oct 12, 2013
c9c6521
docs update
Oct 12, 2013
c230de1
null value fix - issue #1
Nov 17, 2013
461e627
added bower support and json-url(to parse a json from a given url)
May 18, 2014
bc8d9dd
Add support for empty strings
jmendiara May 23, 2014
8dcc30c
Update bower.json
May 23, 2014
c5eb633
added collapsed attribute
May 30, 2014
072501a
Merge pull request #5 from jmendiara/feature/bowerUpdate
May 30, 2014
948268b
Merge pull request #4 from jmendiara/master
May 30, 2014
b937540
empty srting bug fix
May 30, 2014
72d1f24
Fix to error
jibwa Jun 5, 2014
51c0f84
Merge pull request #9 from jibwa/patch-1
Jun 6, 2014
1cb0143
Fixing "Unknown provider" error when minify script https://coderwall.…
Jul 16, 2014
e49ec1f
general fixes
Jan 31, 2015
a9a8150
updated readme
Jan 31, 2015
487d729
updated readme
Jan 31, 2015
2b0c313
Adds main files to bower.json for Wiredep
Mar 26, 2015
4fbd2f5
Merge pull request #17 from drGrove/master
Mar 28, 2015
8c2a0f9
bower.json fix
Mar 28, 2015
3e22206
Fixes
AndiPexton Apr 17, 2015
99f248e
fixes #20
Jun 14, 2015
755b309
Merge pull request #18 from AndiPexton/patch-1
Jun 14, 2015
cd6e215
demo testing
Jun 14, 2015
6fb179e
merge fixes
Jun 14, 2015
054d405
Merge branch 'superboum-master'
Jun 14, 2015
d229bf5
fixed boolean field displaying issue
Oct 22, 2015
3f69ef5
fix attribute names in readme file
amitapl Nov 15, 2015
173db5d
Merge pull request #26 from amitapl/master
Dec 19, 2015
64fdfbc
Merge pull request #24 from spaceapegames/master
Dec 19, 2015
2defa6c
readme merge
Dec 19, 2015
cd9e141
Fixes #25
Dec 19, 2015
d2c1497
Fixes #21
Dec 19, 2015
60b2bb0
Fixes #19
Dec 19, 2015
9500bd4
updated bower version
Dec 19, 2015
91ebbed
readme fix
Dec 19, 2015
41dcdf2
readme fix 2
Dec 19, 2015
768e704
readme fix 3
Dec 19, 2015
33b48da
removed .DS_Store
Dec 19, 2015
2e3fdd6
removed .DS_Store from src folder
Dec 19, 2015
a189c00
url
Dec 19, 2015
75d47e3
sort-by docs
Dec 19, 2015
42cb018
readme fix
Dec 19, 2015
92d518d
gulp-connect + livereload
Dec 20, 2015
cab54d8
readme fixes
Dec 20, 2015
49df1a6
Escape html from string values.
plaflamme Jun 29, 2016
f7236fa
Merge pull request #28 from plaflamme/master
odra Jun 30, 2016
e88b090
Updated libraries, dependencies and syntax based on changes on the li…
maeisabelle08 Sep 25, 2017
48de90f
Updated reference from response to response.data
maeisabelle08 Jan 15, 2018
835ed82
Merge pull request #31 from maeisabelle/master
odra Jan 16, 2018
3ede5c4
moving extra dependencies into dev
epugh Jul 30, 2019
da6205d
Merge pull request #34 from o19s/move_gulp_into_dev_dependencies
odra Jul 30, 2019
2776783
Update README.md
odra Oct 1, 2019
90bdfab
Update README.md
odra Oct 1, 2019
23debd0
attempt to move gulp to dev dependency to remove from splainer projec…
epugh Apr 14, 2020
2848ac9
Merge pull request #35 from o19s/master
odra Apr 14, 2020
529f37d
Bump concat-with-sourcemaps from 1.0.4 to 1.1.0
dependabot[bot] Apr 14, 2020
c37a2fd
Merge pull request #36 from odra/dependabot/npm_and_yarn/concat-with-…
odra Apr 14, 2020
c40c7bd
Bump websocket-extensions from 0.1.2 to 0.1.4
dependabot[bot] Jun 6, 2020
66dc1d8
Merge pull request #37 from odra/dependabot/npm_and_yarn/websocket-ex…
odra Jun 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "demo/libs"
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bower_components
.tmp
node_modules
old
.DS_Store
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2013, Goldark
Copyright (c) 2013, Goldark <[email protected]>

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
107 changes: 78 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,109 @@
#ng-json-explorer
# ng-json-explorer

**I AM NO LONGER MAINTAINING THIS PROJECT** - please let me know if you would like to adopt it.

Simple json explorer angular directive that uses raw json data as source.

This module is inspired by the firefox jsonview extenrsion made by Ben Hollis: https://github.com/bhollis/jsonview/
This module is based in the firefox jsonview extenrsion made by Ben Hollis: https://github.com/bhollis/jsonview/

## Properties
The directive has the following properties:

- **data:** json content to be displayed (needs to be and object or array);
- **json-data:** alias for data
- **url:** An string url to be fetched (HTTP GET) or an object to be used by $http service;
- **collapsed:** a boolean value to collapse (or not) objects/arrays content when the data is loaded/parsed;
- **sort-by**: a field to used as reference to order the json data (should be an array): sort-by="counter:asc" or sort-by="name:desc".

## Styling

Check src/angular-json-explorer.css

##Usage

Check the demo folder (demo.html) for a simple example.
## Usage

#Including the required files (js and css)
Check the demo folder (demo/index.html) for examples.

## Installation

```sh
bower install ng-json-explorer
```
<script src="ng-json-explorer.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="ng-json-explorer.min.css" />

## Module dependency

```js
angular
.module('app', ['ngJsonExplorer'])
```

##Sending the json data to your template
Files to be used in production are located in the folder "ng-json-explorer/dist"

## Including the required files (js and css)

```html
<script src="angular-json-explorer.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="angular-json-explorer.css" />
```

## Sending the json data to your template

```js
$scope.data = {
'name': 'Json Explorer',
'qty': 10,
'has_data': true,
'arr': [
"name": "Json Explorer",
"qty": 10,
"has_data": true,
"arr": [
10,
'str',
"str",
{
'nested': 'object'
"nested": "object"
}
],
'obj': {
'hello': 'world'
"obj": {
"hello": "world"
}
};
}
```

##Usage
### Usage

####Using the directive to display the data
Check the demo folder (demo/index.html) for a simple example.

```
<json-explorer json-data="{{data}}"></json-explorer>
### Using the directive to display the data (you can use either "json-data" or "data")

```html
<json-explorer json-data="data"></json-explorer>
<json-explorer data="data"></json-explorer>
```

#####Using the directive to display the data from a URL
### Using the directive to display the data from a URL

```html
<json-explorer url="http://myurl.com"></json-explorer>
```
<json-explorer json-url="http://myurl.com"></json-explorer>
```
####Using the collapsed attribute

### Using the collapsed attribute

```html
<json-explorer json-data="data" collapsed="true"></json-explorer>
<json-explorer data="data" collapsed="true"></json-explorer>
```
<json-explorer json-data="{{data}}" collapsed="true"></json-explorer>
### Using the directive to display the data

```html
<json-explorer json-data="data"></json-explorer>
<json-explorer data="data"></json-explorer>
```

####Using the order-by attribute (beta)
### Using the directive to display the data from a URL

```html
<json-explorer url="http://myurl.com"></json-explorer>
```
<json-explorer json-data="{{data}}" order-by="price:asc"></json-explorer>
<json-explorer json-data="{{data}}" order-by="price:desc"></json-explorer>
### Using the collapsed attribute

```html
<json-explorer json-data="data" collapsed="true"></json-explorer>
<json-explorer data="data" collapsed="true"></json-explorer>
```
13 changes: 8 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "ng-json",
"version": "1.0.0",
"name": "ng-json-explorer",
"version": "1.3.6",
"license": "MIT",
"main": [
"dist/angular-json-explorer.js",
"dist/angular-json-explorer.css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"angularjs": "~1.2.20",
"angular": "~1.6.6"
}
}
}
Loading