Primeng: Template parse errors: "let-" is only supported on template elements.

Created on 12 Apr 2017  Â·  12Comments  Â·  Source: primefaces/primeng

Hi Team,
Can anyone provide the solution for the above error. We are facing this issue from last week but still upto now we didn't find any solution for this.
Kindly Help asap to the error resolved.

vendor.bundle.js:51217 EXCEPTION: Uncaught (in promise): Error: Template parse errors:
"let-" is only supported on template elements. ("

<p-dataTable [value]="cars" expandableRows="true">
    <ng-template [ERROR ->]let-car pTemplate="rowexpansion">
        <div class="ui-grid ui-grid-responsive ui-fluid" style="): DashboardComponent@3:21

'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. ("
<p-dataTable [value]="cars" expandableRows="true">
    [ERROR ->]<ng-template let-car pTemplate="rowexpansion">
        <div class="ui-grid ui-grid-responsive ui-"): DashboardComponent@3:8

Error: Template parse errors:
"let-" is only supported on template elements. ("

<p-dataTable [value]="cars" expandableRows="true">
    <ng-template [ERROR ->]let-car pTemplate="rowexpansion">
        <div class="ui-grid ui-grid-responsive ui-fluid" style="): DashboardComponent@3:21

'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. ("
<p-dataTable [value]="cars" expandableRows="true">
    [ERROR ->]<ng-template let-car pTemplate="rowexpansion">
        <div class="ui-grid ui-grid-responsive ui-"):

image

Regards,
SAPAriba Team

Most helpful comment

+1, same error after update to angular 5 from angular 2. Any ideas how to fix?

All 12 comments

Which Angular version do you use? ng-template is Angular4

Please use forum for support requests, seems to be related to your Angular version.

faced the same issue... but now fixed it

Try template instead of ng-template...it's working fine for me

@binary2quantum Works for me too. I use angular 2

image

Error: Template parse errors:↵"let-" is only supported on ng-template elements. ("eadOnly]="true">
↵