Vscode-ng-language-service: [Angular] Member 'd' is not callable

Created on 21 Feb 2018  ·  3Comments  ·  Source: angular/vscode-ng-language-service

If I use default Modal sample from ng-bootstrap I get errors like

[Angular] Member 'd' is not callable

<ng-template #confirmDlg let-c="close" let-d="dismiss">
    <div class="modal-header">
      <h4 class="modal-title">Confirm</h4>
      <button type="button" class="close" aria-label="Close" (click)="d('Cross click')">
        <span aria-hidden="true">&times;</span>
      </button>
    </div>
    <div class="modal-body">
      <p>Content</p>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-outline-dark" (click)="d('Cross click')">Close</button>
    </div>
  </ng-template>

using

  • VS Code 1.20.1,
  • Angular 5.2.0 (app genereted by ng CLI)
  • Angular Language Service 0.1.9 VS Code extension
  • @ng-bootstrap/ng-bootstrap: "^1.0.0"

Most helpful comment

I had the same issue, managed a workaround where I add the function call to the assignment.

<ng-template #content let-ca="close('a')" let-cb="close('b')" let-d="dismiss()">
  <button (click)="ca">Close with 'A'</button>
</ng-template>

All 3 comments

I had the same issue, managed a workaround where I add the function call to the assignment.

<ng-template #content let-ca="close('a')" let-cb="close('b')" let-d="dismiss()">
  <button (click)="ca">Close with 'A'</button>
</ng-template>

Sorry it took so long, https://github.com/angular/angular/pull/33782 should fix this.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BorntraegerMarc picture BorntraegerMarc  ·  5Comments

pfeigl picture pfeigl  ·  6Comments

daveriedstra picture daveriedstra  ·  3Comments

seangwright picture seangwright  ·  4Comments

wvanderdeijl picture wvanderdeijl  ·  6Comments