Skip to content

Commit

Permalink
Add track by $index
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen1 committed Jun 5, 2015
1 parent 3559288 commit 7b34ddd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/json-formatter.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jsonformatter
*
* Version: 0.2.7 - 2014-12-21T20:19:06.895Z
* Version: 0.2.7 - 2015-06-02T21:39:36.129Z
* License: MIT
*/

Expand Down
4 changes: 2 additions & 2 deletions dist/json-formatter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jsonformatter
*
* Version: 0.2.7 - 2014-12-21T20:19:06.891Z
* Version: 0.2.7 - 2015-06-02T21:39:36.121Z
* License: MIT
*/

Expand Down Expand Up @@ -186,4 +186,4 @@ angular.module('RecursionHelper', []).factory('RecursionHelper', ['$compile', fu
};
}]);

angular.module("jsonFormatter").run(["$templateCache", function($templateCache) {$templateCache.put("json-formatter.html","<div ng-init=\"isOpen = open && open > 0\" class=\"json-formatter-row\"><a ng-click=\"toggleOpen()\"><span class=\"toggler {{isOpen ? \'open\' : \'\'}}\" ng-if=\"isObject()\"></span> <span class=\"key\" ng-if=\"hasKey\">{{key}}:</span> <span class=\"value\"><span ng-if=\"isObject()\"><span class=\"constructor-name\">{{getConstructorName(json)}}</span> <span ng-if=\"isArray()\"><span class=\"bracket\">[</span><span class=\"number\">{{json.length}}</span><span class=\"bracket\">]</span></span></span> <span ng-if=\"!isObject()\" ng-click=\"openLink(isUrl)\" class=\"{{type}}\" ng-class=\"{date: isDate, url: isUrl}\">{{parseValue(json)}}</span></span></a><div class=\"children\" ng-if=\"getKeys().length && isOpen\"><json-formatter ng-repeat=\"key in getKeys()\" json=\"json[key]\" key=\"key\" open=\"childrenOpen()\"></json-formatter></div><div class=\"children empty object\" ng-if=\"isEmptyObject()\"></div><div class=\"children empty array\" ng-if=\"getKeys() && !getKeys().length && isOpen && isArray()\"></div></div>");}]);
angular.module("jsonFormatter").run(["$templateCache", function($templateCache) {$templateCache.put("json-formatter.html","<div ng-init=\"isOpen = open && open > 0\" class=\"json-formatter-row\"><a ng-click=\"toggleOpen()\"><span class=\"toggler {{isOpen ? \'open\' : \'\'}}\" ng-if=\"isObject()\"></span> <span class=\"key\" ng-if=\"hasKey\">{{key}}:</span> <span class=\"value\"><span ng-if=\"isObject()\"><span class=\"constructor-name\">{{getConstructorName(json)}}</span> <span ng-if=\"isArray()\"><span class=\"bracket\">[</span><span class=\"number\">{{json.length}}</span><span class=\"bracket\">]</span></span></span> <span ng-if=\"!isObject()\" ng-click=\"openLink(isUrl)\" class=\"{{type}}\" ng-class=\"{date: isDate, url: isUrl}\">{{parseValue(json)}}</span></span></a><div class=\"children\" ng-if=\"getKeys().length && isOpen\"><json-formatter ng-repeat=\"key in getKeys() track by $index\" json=\"json[key]\" key=\"key\" open=\"childrenOpen()\"></json-formatter></div><div class=\"children empty object\" ng-if=\"isEmptyObject()\"></div><div class=\"children empty array\" ng-if=\"getKeys() && !getKeys().length && isOpen && isArray()\"></div></div>");}]);
2 changes: 1 addition & 1 deletion dist/json-formatter.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions dist/json-formatter.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/json-formatter.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</span>
</a>
<div class="children" ng-if="getKeys().length && isOpen">
<json-formatter ng-repeat="key in getKeys()" json="json[key]" key="key" open="childrenOpen()"></json-formatter>
<json-formatter ng-repeat="key in getKeys() track by $index" json="json[key]" key="key" open="childrenOpen()"></json-formatter>
</div>
<div class="children empty object" ng-if="isEmptyObject()"></div>
<div class="children empty array" ng-if="getKeys() && !getKeys().length && isOpen && isArray()"></div>
Expand Down

0 comments on commit 7b34ddd

Please sign in to comment.