Vscode-ng-language-service: Incorrect handling of inherited input property

Created on 29 Sep 2020  路  2Comments  路  Source: angular/vscode-ng-language-service

Angular Language Service can't correctly handle inherited input property if it listed in @Component decorator of base component (rather than decorated by @Input decorator).

To Reproduce

  1. Unpack attached source code.
    inheritance.zip
  2. Run 'npm install' in the unpacked folder.
  3. Open folder with the unpacked files in VSCode
  4. Open Problems panel (there is no error).
  5. Open src/app/derived/derived.component.ts file.
  6. Open src/app/app.component.html file.
  7. Switch to derived.component.ts file and comment out line 12:
    7
  8. Observe error in Problems panel (nevertheless application runs correctly):
    8

Expected behavior
No error should arise.

bug ivy

Most helpful comment

I have the same kind of issue based with libraries:

My project used libraries:

  • I have a base class in a library A
  • The class/interface declaration in library B
  • The instantiation in my Project NG.
    It identifies the properties done in library B but not the one done in library A.

Regards

All 2 comments

I have the same kind of issue based with libraries:

My project used libraries:

  • I have a base class in a library A
  • The class/interface declaration in library B
  • The instantiation in my Project NG.
    It identifies the properties done in library B but not the one done in library A.

Regards

This has been fixed by the new Ivy-native language service, released in v11.1.0.
It's an opt-in feature for now, please give it a try and let us know if you have any feedback.
For the best editor experience, please make sure your project has strictTemplates enabled in angularCompilerOptions.
In case you run into similar bug, please file a new issue. I'll close this for now.

Was this page helpful?
0 / 5 - 0 ratings