{"action":"opened","issue":{"url":"https://api.github.com/repos/cdll/blog/issues/11","repository_url":"https://api.github.com/repos/cdll/blog","labels_url":"https://api.github.com/repos/cdll/blog/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/cdll/blog/issues/11/comments","events_url":"https://api.github.com/repos/cdll/blog/issues/11/events","html_url":"https://github.com/cdll/blog/issues/11","id":151797254,"number":11,"title":"[原]angularjs中产生$haskey属性的解决办法","user":{"login":"cdll","id":8576686,"avatar_url":"https://avatars.githubusercontent.com/u/8576686?v=3","gravatar_id":"","url":"https://api.github.com/users/cdll","html_url":"https://github.com/cdll","followers_url":"https://api.github.com/users/cdll/followers","following_url":"https://api.github.com/users/cdll/following{/other_user}","gists_url":"https://api.github.com/users/cdll/gists{/gist_id}","starred_url":"https://api.github.com/users/cdll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdll/subscriptions","organizations_url":"https://api.github.com/users/cdll/orgs","repos_url":"https://api.github.com/users/cdll/repos","events_url":"https://api.github.com/users/cdll/events{/privacy}","received_events_url":"https://api.github.com/users/cdll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-29T05:44:59Z","updated_at":"2016-04-29T05:44:59Z","closed_at":null,"body":"1，使用Angular.toJson()方法代替JSON.stringify()方法；\r\n2，在做repeat的列表中声明trackBy后缀。\r\n[问题参考地址](https://stackoverflow.com/questions/18826320/what-is-the-hashkey-added-to-my-json-stringify-result/23656919#23656919)\r\n````\r\nAngular adds this to keep track of your changes, so it knows when it needs to update the DOM.\r\n\r\nIf you use angular.toJson(obj) instead of JSON.stringify(obj) then Angular will strip out these internal-use values for you.\r\n\r\nAlso, if you change your repeat expression to use the track by {uniqueProperty} suffix, Angular won't have to add $$hashKey at all. For example\r\n\r\n <ul>\r\n    <li ng-repeat=\"link in navLinks track by link.href\">\r\n        <a ng-href=\"link.href\">{{link.title}}</a>\r\n    </li>\r\n</ul>\r\nJust always remember you need the \"link.\" part of the expression - I always tend to forget that. Just track by href will surely not work.\r\n````"}}