{"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":"refact(ngOptions): major refactoring...","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":29,"closed_issues":6,"state":"open","created_at":"2014-12-12T10:36:27Z","updated_at":"2015-01-12T14:41:34Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2015-01-04T14:30:47Z","updated_at":"2015-01-12T19:48:04Z","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\nWhen using `ngOptions`: the directive applies a surrogate key as the value of the `<option>` element.\r\nThis commit changes the actual string used as the surrogate key. We now store a string that is computed\r\nby calling `hashKey` on the item in the options collection; previously it was the index or key of the\r\nitem 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. You may find that you can use the `track by` feaure of `ngOptions`\r\nas this provides the ability to specify the key that is stored.\r\n\r\nBREAKING CHANGE:\r\n\r\nWhen iterating over an object's properties using the `(key, value) in obj` syntax the order of the elements used to be sorted alphabetically. This was an artificial attempt to create a deterministic ordering since browsers don't guarantee the order. But in practice this is not what people want and so this change iterates over properties in the order they are returned by `Object.keys(obj)`, which is almost always the order in which the properties were defined.\r\n\r\nCloses #8019\r\nCloses #9714\r\nCloses #10531"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/69632952","html_url":"https://github.com/angular/angular.js/pull/10639#issuecomment-69632952","issue_url":"https://api.github.com/repos/angular/angular.js/issues/10639","id":69632952,"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-12T19:48:04Z","updated_at":"2015-01-12T19:48:04Z","body":"Landing now."}}