我在angular 4中得到了这个错误:
The <template> element is deprecated. Use <ng-template> instead ("
[attr.tabIndex]="-1"
[ngClass]="{'k-item': true}">
[WARNING ->]<template *ngIf="template"
[templateContext]="{
您是否计划在最终版本中更新此版本?
我正在尝试使用路由器上的属性来触发ngIf,但不确定html中的正确语法。Angular2 RC6
{
path: 'detail/:id',
component: HeroDetailComponent
},
<div *ngIf="router.component = HeroDetailComponent">
some text to be shown if the HeroDetailComponent is loaded
</div>