{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/771","labels_url":"https://api.github.com/repos/angular-ui/ui-select/issues/771/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-select/issues/771/comments","events_url":"https://api.github.com/repos/angular-ui/ui-select/issues/771/events","html_url":"https://github.com/angular-ui/ui-select/issues/771","id":62547617,"number":771,"title":"I can´t set a default value if the data comes from an $resource","user":{"login":"reds071286","id":11352563,"avatar_url":"https://avatars.githubusercontent.com/u/11352563?v=3","gravatar_id":"","url":"https://api.github.com/users/reds071286","html_url":"https://github.com/reds071286","followers_url":"https://api.github.com/users/reds071286/followers","following_url":"https://api.github.com/users/reds071286/following{/other_user}","gists_url":"https://api.github.com/users/reds071286/gists{/gist_id}","starred_url":"https://api.github.com/users/reds071286/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reds071286/subscriptions","organizations_url":"https://api.github.com/users/reds071286/orgs","repos_url":"https://api.github.com/users/reds071286/repos","events_url":"https://api.github.com/users/reds071286/events{/privacy}","received_events_url":"https://api.github.com/users/reds071286/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-18T00:13:05Z","updated_at":"2015-03-18T02:52:26Z","closed_at":"2015-03-18T02:52:26Z","body":"First, apologize for my bad English, I want to load a list of  states and set selected one of this by default in my ui-select element. I dont have any problem if i do something like this.\r\n\r\n $scope.constants = {\r\n            states: [\r\n              {\r\n                 codeId: \"SIN\",\r\n                  codeDescription: \"SINALOA\"\r\n              },\r\n              {\r\n                  codeId: \"MICH\",\r\n                  codeDescription: \"MICHOACAN\"\r\n              },\r\n              {\r\n                  codeId: \"COL\",\r\n                  codeDescription: \"COLIMA\"\r\n              },\r\n            ]\r\n        };\r\n\r\n $scope.constants.selected = \"COL\";\r\n\r\nBut the problem is that my list of states comes from an API call with $resource method and i cannot set a default value in the same way, Any ideas why? o what i have to do?"}}