I use reactive form i create a method called displyFiledError it take filed name and return ValidationErrors so i can access it in template but i got an error
[Angular] Identifier 'email' is not defined. '__type' does not contain such a member
even in typescript there is no suggestions but no error in run type
As an addition to this.


I have the same issue using reactive forms
I have the same issue using angular 6 reactive forms validation.

same here.

VSCode version:
Version: 1.30.2 (system setup)
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:54:13.295Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.17134
It can be solved by adding !! like in example below, before expression, but in my case I don't need true or false as return statement

Found solution here: https://stackoverflow.com/a/49880644/7986808
<em *ngIf="abstract.invalid && abstract.dirty && !!abstract?.errors.restrictedWords">Restricted words found:
{{abstract.errors['restrictedWords']}}</em>
This is similar to https://github.com/angular/vscode-ng-language-service/issues/149, will track issue there.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
same here.

VSCode version:
It can be solved by adding
!!like in example below, before expression, but in my case I don't needtrueorfalseas return statementFound solution here: https://stackoverflow.com/a/49880644/7986808