Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uplanguage-service: Member (function) is not callable in ng-template #16643
Comments
|
+1 |
1 similar comment
|
+1 |
|
@chuckjaz any updates on this? |
|
Any progress on this issue ? |
|
Progress? It's very annoying... |
|
Same happening here, using Angular 5.2.8. |
|
Same here, tested on Angular 5.2.7 and 6.0.0-beta.7 regarding the same ng-bootstrap modal example referenced above. |
|
Same here, Angular 5.2.9 and ng-bootstrap 1.0.4. |
|
Same here, using VSCode. |
|
Until this gets somehow fixed, you can workaround this by creating a trigger method and use it like this:
In component add the method:
|
|
Another workaround is proposed here: angular/vscode-ng-language-service#234 (comment) |
|
That's caused by "Angular Language Service" plugin in VS-Code. Just uninstall it. |
|
This workaround is working for me: <ng-template let-column="column" let-sort="sortFn()" ngx-datatable-header-template>
<span (click)="sort">{{column.name}}</span>
</ng-template>By invoking the function inside the |
|
All this workarounds will not work if you have to pass a template variable to the function.
this works
I have still this issue with angular-language-service 6.1. |
|
The workaround that I use is this: Instead of passing the And use it like this with no errors:
|
|
@isaacplmann Thanks for the workaround. |
|
I've got the same problem and found another workaround: use <ng-template ng-label-tmp ng-label-tmp let-item="item" let-clear="clear">
<span (click)="clear.call(undefined, item)">clear</span>
</ng-template> |
|
any updates? |
|
Almost six more months. Still running into this issue. Worked around by boxing the function in an object. |
|
any updates? |
|
@kyliau this one is a real annoyance. Type |
This commit fixes a long standing bug whereby a template variable that gets initialized to a class method gets resolved to the Any type, thus when it is called the language service produces error "Member X is not callable". PR closes angular#16643 PR closes angular/vscode-ng-language-service#234
This commit fixes a long standing bug whereby a template variable that gets initialized to a class method gets resolved to the Any type, thus when it is called the language service produces error "Member X is not callable". PR closes angular#16643 PR closes angular/vscode-ng-language-service#234
This commit fixes a long standing bug whereby a template variable that gets initialized to a class method gets resolved to the Any type, thus when it is called the language service produces error "Member X is not callable". PR closes angular#16643 PR closes angular/vscode-ng-language-service#234
|
Sorry it took so long, #33782 should fix this. |
This commit fixes a long standing bug whereby a template variable that gets initialized to a class method gets resolved to the Any type, thus when it is called the language service produces error "Member X is not callable". PR closes angular#16643 PR closes angular/vscode-ng-language-service#234
This commit fixes a long standing bug whereby a template variable that gets initialized to a class method gets resolved to the Any type, thus when it is called the language service produces error "Member X is not callable". PR closes #16643 PR closes angular/vscode-ng-language-service#234 PR Close #33782
|
I am still experiencing this error with language service 0.900.0 in combination with transloco, See for an example: |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ... (check one with "x")
Current behavior
As seen in demo for ngx-datatable project, this usage:
Results in an error of:
Error:(32, 2) Angular: Member sort is not callableExpected behavior
No error.
sortFnis a callable function and the code does in fact work correctly.Minimal reproduction of the problem with instructions
Run demo for ngx-datatable through the language-service.
What is the motivation / use case for changing the behavior?
I like my error console to be empty. Having to constantly mentally process and dismiss this error in the IDE is unproductive.
Please tell us about your environment:
IntelliJ IDEA 2017.1.1
Build #IU-171.4073.35, built on April 6, 2017
JRE: 1.8.0_112-release-736-b16 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.4
Angular version: 4.0.3
Browser: N/A
Language: TypeScript 2.2.2
Node (for AoT issues):
node --version= v7.9.0