{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/302","labels_url":"https://api.github.com/repos/angular-ui/ui-select/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-select/issues/302/comments","events_url":"https://api.github.com/repos/angular-ui/ui-select/issues/302/events","html_url":"https://github.com/angular-ui/ui-select/issues/302","id":45736524,"number":302,"title":"Provide option to add no-value choice","user":{"login":"just-boris","id":812240,"avatar_url":"https://avatars.githubusercontent.com/u/812240?v=3","gravatar_id":"","url":"https://api.github.com/users/just-boris","html_url":"https://github.com/just-boris","followers_url":"https://api.github.com/users/just-boris/followers","following_url":"https://api.github.com/users/just-boris/following{/other_user}","gists_url":"https://api.github.com/users/just-boris/gists{/gist_id}","starred_url":"https://api.github.com/users/just-boris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/just-boris/subscriptions","organizations_url":"https://api.github.com/users/just-boris/orgs","repos_url":"https://api.github.com/users/just-boris/repos","events_url":"https://api.github.com/users/just-boris/events{/privacy}","received_events_url":"https://api.github.com/users/just-boris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/ui-select/milestones/8","html_url":"https://github.com/angular-ui/ui-select/milestones/0.10.x","labels_url":"https://api.github.com/repos/angular-ui/ui-select/milestones/8/labels","id":749141,"number":8,"title":"0.10.x","description":null,"creator":{"login":"dimirc","id":5034942,"avatar_url":"https://avatars.githubusercontent.com/u/5034942?v=3","gravatar_id":"","url":"https://api.github.com/users/dimirc","html_url":"https://github.com/dimirc","followers_url":"https://api.github.com/users/dimirc/followers","following_url":"https://api.github.com/users/dimirc/following{/other_user}","gists_url":"https://api.github.com/users/dimirc/gists{/gist_id}","starred_url":"https://api.github.com/users/dimirc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimirc/subscriptions","organizations_url":"https://api.github.com/users/dimirc/orgs","repos_url":"https://api.github.com/users/dimirc/repos","events_url":"https://api.github.com/users/dimirc/events{/privacy}","received_events_url":"https://api.github.com/users/dimirc/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":9,"state":"open","created_at":"2014-08-11T02:33:05Z","updated_at":"2015-09-28T19:21:39Z","due_on":null,"closed_at":null},"comments":50,"created_at":"2014-10-14T10:52:41Z","updated_at":"2015-11-25T08:15:31Z","closed_at":null,"body":"Angular.js [select directive](https://docs.angularjs.org/api/ng/directive/select) have a convenient way to define null-value option. If you put `<option>` tag without value inside `<select>`, it will be treated as null-option which sets model value to `null`.\r\nIt is useful sometimes to provide user ability to reset selected value. Now I have to implicitly add that item to other choices in repeat.\r\n\r\n```js\r\n$scope.persons = [{\"id\": null, \"name\": \"No person\"}].concat(otherPersons)\r\n```\r\n```html\r\n<ui-select ng-model=\"form.person\">\r\n    <ui-select-match placeholder=\"Select person...\">{{$select.selected.name}}</ui-select-match>\r\n    <ui-select-choices repeat=\"person.id as person in persons\">{{person.title}}</ui-select-choices>\r\n</ui-select>\r\n```\r\nI don't want to do it and it would be good if you will have an option for provide this option through html, for example\r\n```html\r\n<ui-select ng-model=\"form.person\">\r\n    <ui-select-match placeholder=\"Select person...\">{{$select.selected.name}}</ui-select-match>\r\n    <ui-select-null-choice>No person</ui-select-null-choice>\r\n    <ui-select-choices repeat=\"person.id as person in persons\">{{person.title}}</ui-select-choices>\r\n</ui-select>\r\n```\r\nIt is similar to select directive logic and looks good for me. What do you think?"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/comments/159530912","html_url":"https://github.com/angular-ui/ui-select/issues/302#issuecomment-159530912","issue_url":"https://api.github.com/repos/angular-ui/ui-select/issues/302","id":159530912,"user":{"login":"jitendersandhu","id":14833247,"avatar_url":"https://avatars.githubusercontent.com/u/14833247?v=3","gravatar_id":"","url":"https://api.github.com/users/jitendersandhu","html_url":"https://github.com/jitendersandhu","followers_url":"https://api.github.com/users/jitendersandhu/followers","following_url":"https://api.github.com/users/jitendersandhu/following{/other_user}","gists_url":"https://api.github.com/users/jitendersandhu/gists{/gist_id}","starred_url":"https://api.github.com/users/jitendersandhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitendersandhu/subscriptions","organizations_url":"https://api.github.com/users/jitendersandhu/orgs","repos_url":"https://api.github.com/users/jitendersandhu/repos","events_url":"https://api.github.com/users/jitendersandhu/events{/privacy}","received_events_url":"https://api.github.com/users/jitendersandhu/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T08:15:31Z","updated_at":"2015-11-25T08:15:31Z","body":"+1"}}