{"action":"created","issue":{"url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/149","repository_url":"https://api.github.com/repos/angular/vscode-ng-language-service","labels_url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/149/comments","events_url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/149/events","html_url":"https://github.com/angular/vscode-ng-language-service/issues/149","id":251260594,"node_id":"MDU6SXNzdWUyNTEyNjA1OTQ=","number":149,"title":"errors?.required highlighted as error","user":{"login":"marcelnem","id":6547340,"node_id":"MDQ6VXNlcjY1NDczNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/6547340?v=4","gravatar_id":"","url":"https://api.github.com/users/marcelnem","html_url":"https://github.com/marcelnem","followers_url":"https://api.github.com/users/marcelnem/followers","following_url":"https://api.github.com/users/marcelnem/following{/other_user}","gists_url":"https://api.github.com/users/marcelnem/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelnem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelnem/subscriptions","organizations_url":"https://api.github.com/users/marcelnem/orgs","repos_url":"https://api.github.com/users/marcelnem/repos","events_url":"https://api.github.com/users/marcelnem/events{/privacy}","received_events_url":"https://api.github.com/users/marcelnem/received_events","type":"User","site_admin":false},"labels":[{"id":448510285,"node_id":"MDU6TGFiZWw0NDg1MTAyODU=","url":"https://api.github.com/repos/angular/vscode-ng-language-service/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":54,"created_at":"2017-08-18T14:22:10Z","updated_at":"2018-11-21T15:55:08Z","closed_at":null,"author_association":"NONE","body":"in 0.1.4 on Windows 10\r\n\r\n`errors?.required` is highlighted as an error\r\n\r\n<div class=\"container\">\r\n\r\n    <form (submit)=\"onSubmit()\" novalidate #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n        <div class=\"form-group\">\r\n            <label for=\"name\">Name</label>\r\n            <input type=\"text\" class=\"form-control\" [(ngModel)]=\"user.name\" name=\"name\" #userName=\"ngModel\" minLength=\"2\" required>\r\n            <div *ngIf=\"userName.touched && userName.errors?.required\" class=\"alert alert-danger\">Name is required</div>\r\n        </div>\r\n        <div class=\"form-group\">\r\n            <label for=\"name\">Email</label>\r\n            <input type=\"text\" class=\"form-control\" [(ngModel)]=\"user.email\" name=\"email\" #userEmail=\"ngModel\" required>\r\n        </div>\r\n        <div class=\"form-group\">\r\n            <label for=\"age\">Phone</label>\r\n            <input type=\"number\" class=\"form-control\" [(ngModel)]=\"user.phone\" #userPhone=\"ngModel\" name=\"phone\" minlength=\"10\">\r\n        </div>\r\n        <input type=\"submit\" value=\"Submit\" class=\"btn btn-success\">\r\n    </form>\r\n</div>\r\n\r\n![image](https://user-images.githubusercontent.com/6547340/29462941-4be9d6a0-8431-11e7-81da-63866f8d6c97.png)\r\n"},"comment":{"url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/comments/440716331","html_url":"https://github.com/angular/vscode-ng-language-service/issues/149#issuecomment-440716331","issue_url":"https://api.github.com/repos/angular/vscode-ng-language-service/issues/149","id":440716331,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDcxNjMzMQ==","user":{"login":"marlonpatrick10","id":1513408,"node_id":"MDQ6VXNlcjE1MTM0MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1513408?v=4","gravatar_id":"","url":"https://api.github.com/users/marlonpatrick10","html_url":"https://github.com/marlonpatrick10","followers_url":"https://api.github.com/users/marlonpatrick10/followers","following_url":"https://api.github.com/users/marlonpatrick10/following{/other_user}","gists_url":"https://api.github.com/users/marlonpatrick10/gists{/gist_id}","starred_url":"https://api.github.com/users/marlonpatrick10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marlonpatrick10/subscriptions","organizations_url":"https://api.github.com/users/marlonpatrick10/orgs","repos_url":"https://api.github.com/users/marlonpatrick10/repos","events_url":"https://api.github.com/users/marlonpatrick10/events{/privacy}","received_events_url":"https://api.github.com/users/marlonpatrick10/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T15:55:08Z","updated_at":"2018-11-21T15:55:08Z","author_association":"NONE","body":"> Hello try it like this.\r\n> Form.hasError('required');\r\n\r\nThis was the most elegant solution, and really works for all cases: myForm.hasError('required', 'myField')"}}
{"actor":{"display_login":"marlonpatrick10"}}