angular 4 and ng-template

idekkers picture idekkers · Mar 28, 2017 · Viewed 12.9k times · Source

I'm getting this warning:

The <template> element is deprecated. Use <ng-template> instead ("
        [attr.tabIndex]="-1"
        [ngClass]="{'k-item': true}">
        [WARNING ->]<template *ngIf="template"
            [templateContext]="{

when using angular 4, is this being taken care of for the release version?

thanks

Answer

G&#252;nter Z&#246;chbauer picture Günter Zöchbauer · Mar 28, 2017

You need to take care of that. You need to modify your code and change all occurences of

<template>

to

<ng-template>

<template> caused conflicts with other usages of the <template> tag, therefore the Angular team changed it to use <ng-template> for Angular purposes. It's a breaking change, therefore they didn't introduce this change in Angular2 but only in Angular4 according to semantic versioning rules.