{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/47431340","id":47431340,"diff_hunk":"@@ -2143,6 +2143,26 @@ describe('ngOptions', function() {\n       expect(scope.selected).toEqual([]);\n     });\n \n+    it('should be possible to specify a value for empty options', function() {\n+      var html = '<select ng-model=\"someModel\" ng-options=\"c for c in choices\" ng-empty-value=\"someVar\">' +\n+                   '<option value=\"\">Choose One</option>' +\n+                 '</select>';\n+      compile(html);\n+      scope.$apply(function() {\n+        scope.choices = ['A','B','C'];\n+        scope.someModel = \"\";\n+        scope.someVar = \"foo\";\n+      });\n+      //current implementation only works if select is not pristine, so we click it back and forth\n+      setSelectValue(element, 3);\n+      setSelectValue(element, 0);\n+\n+      //make sure the empty value is being evaluated as an Angular expression\n+      expect(scope.someModel).toBe(\"foo\");","path":"test/ng/directive/ngOptionsSpec.js","position":19,"original_position":19,"commit_id":"b6fb9c356620775c074a2f04be880c7c7472b788","original_commit_id":"b6fb9c356620775c074a2f04be880c7c7472b788","user":{"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},"body":"We should also check if a change to someVar is picked up by the options directive. So change someVar, change the model, then change back to empty option and check","created_at":"2015-12-12T12:45:21Z","updated_at":"2015-12-12T12:45:21Z","html_url":"https://github.com/angular/angular.js/pull/13471#discussion_r47431340","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/13471","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/47431340"},"html":{"href":"https://github.com/angular/angular.js/pull/13471#discussion_r47431340"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13471"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/13471","id":53057033,"html_url":"https://github.com/angular/angular.js/pull/13471","diff_url":"https://github.com/angular/angular.js/pull/13471.diff","patch_url":"https://github.com/angular/angular.js/pull/13471.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13471","number":13471,"state":"open","locked":false,"title":"fix(ngOptions): add ngEmptyValue attribute to ngOptions","user":{"login":"Thesoro","id":3046572,"avatar_url":"https://avatars.githubusercontent.com/u/3046572?v=3","gravatar_id":"","url":"https://api.github.com/users/Thesoro","html_url":"https://github.com/Thesoro","followers_url":"https://api.github.com/users/Thesoro/followers","following_url":"https://api.github.com/users/Thesoro/following{/other_user}","gists_url":"https://api.github.com/users/Thesoro/gists{/gist_id}","starred_url":"https://api.github.com/users/Thesoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thesoro/subscriptions","organizations_url":"https://api.github.com/users/Thesoro/orgs","repos_url":"https://api.github.com/users/Thesoro/repos","events_url":"https://api.github.com/users/Thesoro/events{/privacy}","received_events_url":"https://api.github.com/users/Thesoro/received_events","type":"User","site_admin":false},"body":"Reference: angular#13334\r\n\r\nThis would allow an additional attribute on ng-options to provide a default value for options that lack values.","created_at":"2015-12-08T23:47:28Z","updated_at":"2015-12-12T12:45:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37af6b28b17293bbe8b3e692003ea6c3c0c12a88","assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/105","html_url":"https://github.com/angular/angular.js/milestones/1.6.x","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/105/labels","id":1317216,"number":105,"title":"1.6.x","description":null,"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":28,"closed_issues":4,"state":"open","created_at":"2015-09-21T20:16:38Z","updated_at":"2015-12-10T13:38:15Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/13471/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/13471/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13471/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/b6fb9c356620775c074a2f04be880c7c7472b788","head":{"label":"Thesoro:empty-value-ngOptions","ref":"empty-value-ngOptions","sha":"b6fb9c356620775c074a2f04be880c7c7472b788","user":{"login":"Thesoro","id":3046572,"avatar_url":"https://avatars.githubusercontent.com/u/3046572?v=3","gravatar_id":"","url":"https://api.github.com/users/Thesoro","html_url":"https://github.com/Thesoro","followers_url":"https://api.github.com/users/Thesoro/followers","following_url":"https://api.github.com/users/Thesoro/following{/other_user}","gists_url":"https://api.github.com/users/Thesoro/gists{/gist_id}","starred_url":"https://api.github.com/users/Thesoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thesoro/subscriptions","organizations_url":"https://api.github.com/users/Thesoro/orgs","repos_url":"https://api.github.com/users/Thesoro/repos","events_url":"https://api.github.com/users/Thesoro/events{/privacy}","received_events_url":"https://api.github.com/users/Thesoro/received_events","type":"User","site_admin":false},"repo":{"id":47580330,"name":"angular.js","full_name":"Thesoro/angular.js","owner":{"login":"Thesoro","id":3046572,"avatar_url":"https://avatars.githubusercontent.com/u/3046572?v=3","gravatar_id":"","url":"https://api.github.com/users/Thesoro","html_url":"https://github.com/Thesoro","followers_url":"https://api.github.com/users/Thesoro/followers","following_url":"https://api.github.com/users/Thesoro/following{/other_user}","gists_url":"https://api.github.com/users/Thesoro/gists{/gist_id}","starred_url":"https://api.github.com/users/Thesoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thesoro/subscriptions","organizations_url":"https://api.github.com/users/Thesoro/orgs","repos_url":"https://api.github.com/users/Thesoro/repos","events_url":"https://api.github.com/users/Thesoro/events{/privacy}","received_events_url":"https://api.github.com/users/Thesoro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thesoro/angular.js","description":"HTML enhanced for web apps","fork":true,"url":"https://api.github.com/repos/Thesoro/angular.js","forks_url":"https://api.github.com/repos/Thesoro/angular.js/forks","keys_url":"https://api.github.com/repos/Thesoro/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thesoro/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thesoro/angular.js/teams","hooks_url":"https://api.github.com/repos/Thesoro/angular.js/hooks","issue_events_url":"https://api.github.com/repos/Thesoro/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/Thesoro/angular.js/events","assignees_url":"https://api.github.com/repos/Thesoro/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/Thesoro/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/Thesoro/angular.js/tags","blobs_url":"https://api.github.com/repos/Thesoro/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thesoro/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thesoro/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thesoro/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thesoro/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Thesoro/angular.js/languages","stargazers_url":"https://api.github.com/repos/Thesoro/angular.js/stargazers","contributors_url":"https://api.github.com/repos/Thesoro/angular.js/contributors","subscribers_url":"https://api.github.com/repos/Thesoro/angular.js/subscribers","subscription_url":"https://api.github.com/repos/Thesoro/angular.js/subscription","commits_url":"https://api.github.com/repos/Thesoro/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thesoro/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thesoro/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thesoro/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Thesoro/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/Thesoro/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thesoro/angular.js/merges","archive_url":"https://api.github.com/repos/Thesoro/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thesoro/angular.js/downloads","issues_url":"https://api.github.com/repos/Thesoro/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/Thesoro/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Thesoro/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Thesoro/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thesoro/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/Thesoro/angular.js/releases{/id}","created_at":"2015-12-07T21:29:20Z","updated_at":"2015-12-07T21:29:40Z","pushed_at":"2015-12-11T22:10:24Z","git_url":"git://github.com/Thesoro/angular.js.git","ssh_url":"git@github.com:Thesoro/angular.js.git","clone_url":"https://github.com/Thesoro/angular.js.git","svn_url":"https://github.com/Thesoro/angular.js","homepage":"http://angularjs.org","size":73000,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"e57cf13d5da204a3324e8b083718c0dcfbb58207","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2015-12-12T12:36:44Z","pushed_at":"2015-12-11T23:55:51Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":141166,"stargazers_count":45030,"watchers_count":45030,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20699,"mirror_url":null,"open_issues_count":1257,"forks":20699,"open_issues":1257,"watchers":45030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13471"},"html":{"href":"https://github.com/angular/angular.js/pull/13471"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/13471"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/13471/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13471/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/13471/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/b6fb9c356620775c074a2f04be880c7c7472b788"}}}}