Created
September 25, 2013 18:06
-
-
Save PatrickJS/6703570 to your computer and use it in GitHub Desktop.
remove $$hashkey from Angular ng-repeat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li ng-repeat="thing in things track by $id($index)"> | |
..... | |
</li> | |
</ul> | |
or | |
<script> | |
JSON.stringify(value, function (key, val) { | |
if (key == '$$hashKey') { | |
return undefined; | |
} | |
return val; | |
}); | |
</script> |
or, if available, something like ng-repeat="thing in things track by thing.someUniqueIdField"
angular.toJson() is enough.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
angular.toJson()
is enough.