Reputation: 69
I have angular 2 rc.1 application. The problem is I am trying to override the existing pager by nesting a ng-template with the directive kendoPagerTemplate inside the kendo-grid. like -
<kendo-grid>
...
<ng-template kendoPagerTemplate>
<!-- add custom components or reuse existing pager elements --->
</ng-template>
</kendo-grid>
but i am getting following error -
my code is below html -
<kendo-grid #grid [kendoGridBinding]="gridData" [pageable]="true" [skip]="skip" style="cursor:pointer" pageSize="10" >
<kendo-grid-column *ngFor="let column of columns" [field]="getColumnField(column)" [title]="getColumnTitle(column)" [width]="getColumnWidth(column)">
<ng-template kendoGridHeaderTemplate let-column="column">
<span [title]="column.title" (click)="onTemplateSpanClick($event)">{{column.title}} </span>
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
<span *ngIf="column!== 'Status'" [title]="column.title">
<span [title]="column.title">
<!-- {{dataItem[column]}} -->
<span [innerHTML]="dataItem[column]"></span>
</span>
</span>
</ng-template>
</kendo-grid-column>
</kendo-grid>
Is there any way to change the existing the kendoGrid footer template , like make it clickable and change color?
Upvotes: 1
Views: 593
Reputation: 73721
According to Angular's changelog, the ng-template
directive was introduced in version 4.0.0-rc.1. Therefore, it was not available in Angular 2 rc.1, the version that you are using. The equivalent in that version was the template
directive.
If the Kendo component requires ng-template
, it may not be compatible with Angular 2. You can find more details about these compatibility issues on this GitHub page.
Upvotes: 1