{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13145","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13145/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13145/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13145/events","html_url":"https://github.com/angular/angular.js/issues/13145","id":112597461,"number":13145,"title":"Update to Angular 1.4 breaks directives that manipulate ngOptions data","user":{"login":"realityking","id":628508,"avatar_url":"https://avatars.githubusercontent.com/u/628508?v=3","gravatar_id":"","url":"https://api.github.com/users/realityking","html_url":"https://github.com/realityking","followers_url":"https://api.github.com/users/realityking/followers","following_url":"https://api.github.com/users/realityking/following{/other_user}","gists_url":"https://api.github.com/users/realityking/gists{/gist_id}","starred_url":"https://api.github.com/users/realityking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realityking/subscriptions","organizations_url":"https://api.github.com/users/realityking/orgs","repos_url":"https://api.github.com/users/realityking/repos","events_url":"https://api.github.com/users/realityking/events{/privacy}","received_events_url":"https://api.github.com/users/realityking/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20forms","name":"component: forms","color":"7B947B"},{"url":"https://api.github.com/repos/angular/angular.js/labels/PRs%20plz!","name":"PRs plz!","color":"02d7e1"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20docs","name":"type: docs","color":"9fe6ad"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/27","html_url":"https://github.com/angular/angular.js/milestones/Backlog","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/27/labels","id":489171,"number":27,"title":"Backlog","description":"Holds the backlog of issues and pull requests that have been triaged.\r\n\r\nBefore assigning items to this milestone they should be labelled, at the very least with the correct \"type\" label (i.e. \"issue\", \"pr\", \"bug\", \"regression\", \"chore\", \"docs\", etc).  Preferably you should also check for duplicate issues/PRs, note CLA status and assign \"complexity\" and \"impact\" labels too.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":676,"closed_issues":1024,"state":"open","created_at":"2013-11-18T23:30:35Z","updated_at":"2015-11-05T16:58:33Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-10-21T14:09:12Z","updated_at":"2015-11-05T19:11:27Z","closed_at":null,"body":"I think there's some subtle difference in the way scopes work between 1.3 and 1.4, but I couldn't find anything in the changelogs.\r\n\r\nIn 1.3 we use a directive like the following to add data to a select element. We don't put the entire element into the directive, as that breaks the `for` attribute, it's also not that easy to handle with ngModel.\r\n\r\n```javascript\r\nmodule.directive('selectCountry', function () {\r\n        return {\r\n            restrict: 'A',\r\n            scope: true,\r\n            link: function ($scope, elem, attrs) {\r\n                attrs.ngOptions = 'country.code as country.name for country in countryList | orderBy:\"name\"';\r\n            },\r\n            controller: function ($scope, countryList) {\r\n                $scope.countryList = [];\r\n\r\n                countryList.getList()\r\n                    .then(function(result) {\r\n                        $scope.countryList = result;\r\n                    });\r\n            }\r\n        };\r\n    })\r\n```\r\n\r\nPlunkr: http://embed.plnkr.co/COWqvLE14hFHnioHn9dP/preview"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/154157282","html_url":"https://github.com/angular/angular.js/issues/13145#issuecomment-154157282","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13145","id":154157282,"user":{"login":"dustinhorne","id":4991606,"avatar_url":"https://avatars.githubusercontent.com/u/4991606?v=3","gravatar_id":"","url":"https://api.github.com/users/dustinhorne","html_url":"https://github.com/dustinhorne","followers_url":"https://api.github.com/users/dustinhorne/followers","following_url":"https://api.github.com/users/dustinhorne/following{/other_user}","gists_url":"https://api.github.com/users/dustinhorne/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinhorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinhorne/subscriptions","organizations_url":"https://api.github.com/users/dustinhorne/orgs","repos_url":"https://api.github.com/users/dustinhorne/repos","events_url":"https://api.github.com/users/dustinhorne/events{/privacy}","received_events_url":"https://api.github.com/users/dustinhorne/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T19:11:27Z","updated_at":"2015-11-05T19:11:27Z","body":"@gkalpak - Thank you much, I'll give it a shot!  We had just updated a couple of weeks ago so I didn't figure it would have been fixed.  It looks like exactly my issue because dropdowns in my views work fine, but dropdowns within directives that are compiled with the values present do result in the duplication."}}