{"push_id":816970858,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"2fcfd75a142200e1a4b1b7ed4fb588e3befcbd57","before":"2d4050754719df5dc658f2730cab84bdb32f47b2","commits":[{"sha":"2fcfd75a142200e1a4b1b7ed4fb588e3befcbd57","author":{"email":"82848f870acf225368925a997f5307e2a6364292@googlemail.com","name":"Martin Staffa"},"message":"fix(ngOptions): override select option registration\n\nWhen ngOptions is present on a select, the option directive should not be able to\nregister options on the selectCtrl since this may cause errors during the\nngOptions lifecycle.\n\nThis can happen in the following cases:\n\n- there is a blank option below the select element, an ngModel\ndirective, an ngOptions directive and some other directive on the select\nelement, which compiles the children of the select\n(i.e. the option elements) before ngOptions is has finished linking.\n\n- there is a blank option below the select element, an ngModel\ndirective, an ngOptions directive and another directive, which uses\ntemplateUrl and replace:true.\n\nWhat happens is:\n- the option directive is compiled and adds an element `$destroy` listener\nthat will call `ngModel.$render` when the option element is removed.\n- when `ngOptions` processes the option, it removes the element, and\ntriggers the `$destroy` listener on the option.\n- the registered `$destroy` listener calls `$render` on `ngModel`.\n- $render calls `selectCtrl.writeValue()`, which accesses the `options`\nobject in the `ngOptions` directive.\n- Since `ngOptions` has not yet completed linking the `options` has not\nyet been defined and we get an error.\n\nThis fix moves the registration code for the `option` directive into the\n`SelectController.registerOption()` method, which is then overridden by\nthe `ngOptions` directive as a `noop`.\n\nFixes #11685\nCloses #12972\nCloses #12968\nCloses #13012","distinct":true,"url":"https://api.github.com/repos/angular/angular.js/commits/2fcfd75a142200e1a4b1b7ed4fb588e3befcbd57"}]}