{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13065","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13065/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13065/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13065/events","html_url":"https://github.com/angular/angular.js/issues/13065","id":110698423,"number":13065,"title":"ng-options duplicates all <option> entries if manual <option> included with ng-if directive on it.","user":{"login":"pavlovich","id":1209167,"avatar_url":"https://avatars.githubusercontent.com/u/1209167?v=3","gravatar_id":"","url":"https://api.github.com/users/pavlovich","html_url":"https://github.com/pavlovich","followers_url":"https://api.github.com/users/pavlovich/followers","following_url":"https://api.github.com/users/pavlovich/following{/other_user}","gists_url":"https://api.github.com/users/pavlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/pavlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavlovich/subscriptions","organizations_url":"https://api.github.com/users/pavlovich/orgs","repos_url":"https://api.github.com/users/pavlovich/repos","events_url":"https://api.github.com/users/pavlovich/events{/privacy}","received_events_url":"https://api.github.com/users/pavlovich/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-09T16:58:47Z","updated_at":"2015-10-12T19:59:17Z","closed_at":"2015-10-09T17:03:01Z","body":"If I create a <select> and use ng-options to populate the available options, and if I want to include a default option using a child <option> element but I want that inclusion to be conditional specified with a ng-if directive, then ng-options will duplicate all of the options. If I use ng-show instead of ng-if, all works as I would expect.\r\n\r\nSee the following plunker: http://plnkr.co/edit/eXkvYQvsyPKEjPKEndhZ?p=preview\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/147504045","html_url":"https://github.com/angular/angular.js/issues/13065#issuecomment-147504045","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13065","id":147504045,"user":{"login":"pavlovich","id":1209167,"avatar_url":"https://avatars.githubusercontent.com/u/1209167?v=3","gravatar_id":"","url":"https://api.github.com/users/pavlovich","html_url":"https://github.com/pavlovich","followers_url":"https://api.github.com/users/pavlovich/followers","following_url":"https://api.github.com/users/pavlovich/following{/other_user}","gists_url":"https://api.github.com/users/pavlovich/gists{/gist_id}","starred_url":"https://api.github.com/users/pavlovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavlovich/subscriptions","organizations_url":"https://api.github.com/users/pavlovich/orgs","repos_url":"https://api.github.com/users/pavlovich/repos","events_url":"https://api.github.com/users/pavlovich/events{/privacy}","received_events_url":"https://api.github.com/users/pavlovich/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T19:59:17Z","updated_at":"2015-10-12T19:59:17Z","body":"Actually, the plunker at the link you provided does not work! It does not\nadd the 'extra' / 'default' choice to the list at all now. If I remove the\nng-if or change it to an ng-show, it works. As it is in the plunker, it is\nnon-functional (the extra item does not show up regardless of the value of\nthe ng-if).\n\nBest regards,\n\nPeter\n\nOn Fri, Oct 9, 2015 at 3:11 PM, Pawel Kozlowski <notifications@github.com>\nwrote:\n\n> @pavlovich <https://github.com/pavlovich> sorry, copied the wrong link.\n> Here you go: http://plnkr.co/edit/GmCbsH0xrMPxviMFD2Qv?p=preview\n>\n> You can always reference build from master using\n> https://code.angularjs.org/snapshot/\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/angular/angular.js/issues/13065#issuecomment-146963460>\n> .\n>\n"}}