question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ngbTooltip: let-" is only supported on template elements.

See original GitHub issue

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 2.3.1

ng-bootstrap: ^1.0.0-alpha.22

Bootstrap: ^3.3.7

angular-cli: 1.0.0-beta.24 I am running into template parse errors when using ngbTooltip when using with <template> tag as shown in demo

HTML Template

<template #tipContent>{{licenorsTooltip}}</template>
    <button type="button" [ngbTooltip]="tipContent" #tooltipLicensors="ngbTooltip" triggers="manual" [placement]="bottom" class="licensor-btn" 
    (click)="toggleSelect()" on-mouseover='toolTipOver()' on-mouseleave="toolTipLeave()">
        <span class="pull-left">{{licensorHeader}}</span>
        <span class="caret pull-right"></span>
    </button>

Errors thrown in browser console: zone.js:522 Unhandled Promise rejection: Template parse errors: “let-” is only supported on template elements. (“<ng-template ngFor [ngForOf]=“parts” [ERROR ->]let-part let-isOdd=“odd”><span *ngIf=“isOdd” class=”{{highlightClass}}“>{{part}}</span><ng-template [”): NgbHighlight@0:37 “let-” is only supported on template elements. (“<ng-template ngFor [ngForOf]=“parts” let-part [ERROR ->]let-isOdd=“odd”><span *ngIf=“isOdd” class=”{{highlightClass}}“>{{part}}</span><ng-template [ngIf]=”!i"): NgbHighlight@0:46 ‘ng-template’ is not a known element:

  1. If ‘ng-template’ is an Angular component, then verify that it is part of this module.
  2. If ‘ng-template’ is a Web Component then add “CUSTOM_ELEMENTS_SCHEMA” to the ‘@NgModule.schemas’ of this component to suppress this message. (“rOf]=“parts” let-part let-isOdd=“odd”><span *ngIf=“isOdd” class=”{{highlightClass}}“>{{part}}</span>[ERROR ->]<ng-template [ngIf]=”!isOdd">{{part}}</ng-template></ng-template>"): NgbHighlight@0:124 ‘ng-template’ is not a known element:
  3. If ‘ng-template’ is an Angular component, then verify that it is part of this module.
  4. If ‘ng-template’ is a Web Component then add “CUSTOM_ELEMENTS_SCHEMA” to the ‘@NgModule.schemas’ of this component to suppress this message. (“[ERROR ->]<ng-template ngFor [ngForOf]=“parts” let-part let-isOdd=“odd”><span *ngIf=“isOdd” class=”{{highlightC"): NgbHighlight@0:0 ; Zone: <root> ; Task: Promise.then ; Value:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pkozlowski-opensourcecommented, May 2, 2017

@blur0224 you need at least Angular 4.0.3 with ng-bootstrap: ^1.0.0-alpha.25 - I’m surprised that you’ve even managed to install it with Angular 2.4.x since we’ve got explicit dependency on ^4.0.3…

Also check changelog: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CHANGELOG.md#100-alpha25-2017-04-25

0reactions
jdinh-mackevisioncommented, May 10, 2017

Is there an ng-bootstrap version that will still work with Angular 2.4?

edit: ng-bootstrap alpha.22 works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"let-" is only supported on ng-template elements - Stack Overflow
I have encountered this error when upgraded from Angular 4.x.x to 5.x.x. Original code was: <template let-item> </template>.
Read more >
Angular 12 ng-bootstrap | Tooltip Tutorial with Examples
This Angular post is compatible with Angular 4 upto latest versions, ... ng-bootstrap includes UI components only, so for adding styling to ...
Read more >
Typeahead - Angular powered Bootstrap
Bootstrap widgets for Angular: autocomplete, accordion, alert, carousel, datepicker, dropdown, offcanvas, pagination, popover, progressbar, rating, tabset, ...
Read more >
Datepicker - Angular powered Bootstrap
Bootstrap widgets for Angular: autocomplete, accordion, alert, carousel, datepicker, dropdown, offcanvas, pagination, popover, progressbar, rating, tabset, ...
Read more >
Pagination - Angular powered Bootstrap
Pagination is a component that only displays page numbers. ... <table> <tr *ngFor="let item of items | slice: (page-1) * pageSize : page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found