{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ng-cordova/issues/1035","labels_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/1035/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/1035/comments","events_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/1035/events","html_url":"https://github.com/driftyco/ng-cordova/issues/1035","id":111994723,"number":1035,"title":"Contact widget issue","user":{"login":"huangyanxiong01","id":5459483,"avatar_url":"https://avatars.githubusercontent.com/u/5459483?v=3","gravatar_id":"","url":"https://api.github.com/users/huangyanxiong01","html_url":"https://github.com/huangyanxiong01","followers_url":"https://api.github.com/users/huangyanxiong01/followers","following_url":"https://api.github.com/users/huangyanxiong01/following{/other_user}","gists_url":"https://api.github.com/users/huangyanxiong01/gists{/gist_id}","starred_url":"https://api.github.com/users/huangyanxiong01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangyanxiong01/subscriptions","organizations_url":"https://api.github.com/users/huangyanxiong01/orgs","repos_url":"https://api.github.com/users/huangyanxiong01/repos","events_url":"https://api.github.com/users/huangyanxiong01/events{/privacy}","received_events_url":"https://api.github.com/users/huangyanxiong01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-18T01:50:37Z","updated_at":"2015-10-28T14:32:18Z","closed_at":null,"body":"```javascript\r\n  $scope.getAllContacts = function() {\r\n    $cordovaContacts.find().then(function(allContacts) { //omitting parameter to .find() causes all contacts to be returned\r\n      $scope.contacts = allContacts;\r\n    }\r\n  };\r\n```\r\n\r\n###### error \r\n```javascript\r\nTypeError: Cannot read property 'fields' of undefined\r\n```\r\n###### correct\r\n```javascript\r\n$cordovaContacts.find(\"*\").then(function(allContacts) {\r\n                    //omitting parameter to .find() causes all contacts to be returned\r\n                    $scope.contacts = allContacts;\r\n                });\r\n```"},"comment":{"url":"https://api.github.com/repos/driftyco/ng-cordova/issues/comments/151863192","html_url":"https://github.com/driftyco/ng-cordova/issues/1035#issuecomment-151863192","issue_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/1035","id":151863192,"user":{"login":"javalight","id":6201595,"avatar_url":"https://avatars.githubusercontent.com/u/6201595?v=3","gravatar_id":"","url":"https://api.github.com/users/javalight","html_url":"https://github.com/javalight","followers_url":"https://api.github.com/users/javalight/followers","following_url":"https://api.github.com/users/javalight/following{/other_user}","gists_url":"https://api.github.com/users/javalight/gists{/gist_id}","starred_url":"https://api.github.com/users/javalight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javalight/subscriptions","organizations_url":"https://api.github.com/users/javalight/orgs","repos_url":"https://api.github.com/users/javalight/repos","events_url":"https://api.github.com/users/javalight/events{/privacy}","received_events_url":"https://api.github.com/users/javalight/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T14:32:18Z","updated_at":"2015-10-28T14:32:18Z","body":"The correction does not work for me i get error:\r\n\r\nUncaught TypeError: Object.keys called on non-object \r\n\r\nCorrect add empty array:\r\n\r\n```javascript\r\n$cordovaContacts.find([]).then(function(allContacts) {\r\n                    $scope.contacts = allContacts;\r\n                });\r\n```\r\n\r\n\r\n"}}