ngbTooltip: let-" is only supported on template elements.
See original GitHub issueVersion 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:
- If ‘ng-template’ is an Angular component, then verify that it is part of this module.
- 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:
- If ‘ng-template’ is an Angular component, then verify that it is part of this module.
- 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:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@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
Is there an ng-bootstrap version that will still work with Angular 2.4?
edit: ng-bootstrap alpha.22 works.