The method "[[METHODNAME]]" that you're trying to access does not exist in the class declaration
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.3.1 node: 8.2.1 os: darwin x64 @angular/animations: 4.3.6 @angular/cdk: 2.0.0-beta.10 @angular/common: 4.3.6 @angular/compiler: 4.3.6 @angular/core: 4.3.6 @angular/flex-layout: 2.0.0-rc.1 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/material: 2.0.0-beta.10 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/router: 4.3.6 @angular/service-worker: 1.0.0-beta.16 @angular/cli: 1.3.1 @angular/compiler-cli: 4.3.6 @angular/language-service: 4.3.6
Repro steps.
- Create a parent abstract class
- Add a public function in that class
- Create a component that extends the parent class
- In the HTML of the component, invoke the function defined in the parent class (works perfectly fine)
- Call the command: "ng lint" <-- This will gives an error stating that the method doesn't exists in the class declaration
The log given by the failure.
ERROR: [PATH]/mytest.component.html[1, 1]: The method "[[METHODNAME]]" that you're trying to access does not exist in the class declaration.
Desired functionality.
I would like the command "ng lint" to realize that the component is extending a parent class and look for the function implementation in the parent class, instead of throwing an error.
Mention any other details that might be useful.
I've the same issue
Also, the same is true for inherited class properties:
The property "[[PROPERTY_NAME]]" that you're trying to access does not exist in the class declaration.
It actually works, but the ng lint command does not seem to like it.
I'm working with slightly older angular package versions:
"@angular/cli": "^1.3.0",
"@angular/common": "^4.3.4",
"@angular/compiler": "^4.3.4",
"@angular/compiler-cli": "^4.3.4",
"@angular/core": "^4.3.4",
"@angular/forms": "^4.3.4",
"@angular/http": "^4.3.4",
"@angular/platform-browser": "^4.3.4",
"@angular/platform-browser-dynamic": "^4.3.4",
"@angular/router": "^4.3.4"
I'm sorry but this error is not fixable in Angular CLI. ng lint uses TSLint and Codelyzer, and I suspect this is a bug in Codelyzer. Can you please open an issue in https://github.com/mgechev/codelyzer instead?
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.