Skip to content

Instantly share code, notes, and snippets.

@PatrickJS
Created September 25, 2013 18:06
Show Gist options
  • Save PatrickJS/6703570 to your computer and use it in GitHub Desktop.
Save PatrickJS/6703570 to your computer and use it in GitHub Desktop.
remove $$hashkey from Angular ng-repeat
<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>
@imwangji
Copy link

imwangji commented Aug 3, 2018

angular.toJson() is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment