{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/10639","labels_url":"https://api.github.com/repos/angular/angular.js/issues/10639/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/10639/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/10639/events","html_url":"https://github.com/angular/angular.js/pull/10639","id":53337829,"number":10639,"title":"fix(ngOptions): ensure that the correct option is selected when options are loaded async","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/branch%3A+1.4.x","name":"branch: 1.4.x","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular.js/labels/cla%3A+yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular.js/labels/component%3A+forms","name":"component: forms","color":"7B947B"},{"url":"https://api.github.com/repos/angular/angular.js/labels/frequency%3A+moderate","name":"frequency: moderate","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs%3A+review","name":"needs: review","color":"eb6420"},{"url":"https://api.github.com/repos/angular/angular.js/labels/severity%3A+broken+expected+use","name":"severity: broken expected use","color":"fbda00"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type%3A+bug","name":"type: bug","color":"000000"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type%3A+refactor","name":"type: refactor","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/80","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/80/labels","id":901585,"number":80,"title":"1.4.x","description":"","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":3,"state":"open","created_at":"2014-12-12T10:36:27Z","updated_at":"2015-01-04T14:31:42Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-01-04T14:30:47Z","updated_at":"2015-01-04T20:56:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/10639","html_url":"https://github.com/angular/angular.js/pull/10639","diff_url":"https://github.com/angular/angular.js/pull/10639.diff","patch_url":"https://github.com/angular/angular.js/pull/10639.patch"},"body":"**Major reworking of select and ngOptions**:\r\n\r\n* The `SelectController` is now used as an abstraction for the `select` and `ngOptions` directives\r\nto override to get their desired behaviour\r\n* The `select` directive is completely oblivious to the ngOptions directive now - the `ngOptions`\r\ndirective could be deleted without having to make any changes to the `select` directive.\r\n* Select related directives (single/multiple/ngOptions) can provide specific versions of\r\n`SelectController.writeValue` and `SelectController.readValue`, which are responsible for getting\r\nthe `$viewValue` in or out of the actual `<select>` element and its `<option>` children.\r\n\r\nBREAKING CHANGE:\r\n\r\nAlthough it is internal, and not documented, this commit changes the actual strings that are stored as\r\nthe value of each `<option>` element. We now store a string that is computed by calling `hashKey` on\r\nthe item in the options collection; before it was the index or key value of the item in the collection.\r\n\r\nBefore you might have seen:\r\n\r\n```\r\n<select ng-model=\"x\" ng-option=\"i in items\">\r\n  <option value=\"1\">a</option>\r\n  <option value=\"2\">b</option>\r\n  <option value=\"3\">c</option>\r\n  <option value=\"4\">d</option>\r\n</select>\r\n```\r\n\r\nNow it will be something like:\r\n\r\n```\r\n<select ng-model=\"x\" ng-option=\"i in items\">\r\n  <option value=\"string:a\">a</option>\r\n  <option value=\"string:b\">b</option>\r\n  <option value=\"string:c\">c</option>\r\n  <option value=\"string:d\">d</option>\r\n</select>\r\n```\r\n\r\nIf your application code relied on this value, which it shouldn't, then you will need to modify your\r\napplication to accommodate this.\r\n\r\nCloses #9714"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/68648597","html_url":"https://github.com/angular/angular.js/pull/10639#issuecomment-68648597","issue_url":"https://api.github.com/repos/angular/angular.js/issues/10639","id":68648597,"user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T20:56:42Z","updated_at":"2015-01-04T20:56:42Z","body":"@lgalfaso  - How's that?"}}