【发布时间】:2017-01-25 15:34:44
【问题描述】:
ng-container 在official documentation 中被提及,但我仍在尝试了解它的工作原理以及用例是什么。
<ng-container> 是否与<template> 做同样的事情,还是取决于是否编写了指令来使用其中之一?
是
<ng-container *ngPluralCase="'=0'">there is nothing</ng-container>
和
<template [ngPluralCase]="'=0'">there is nothing</template>
应该是一样的吧?
我们如何选择其中之一?
<ng-container> 如何在自定义指令中使用?
【问题讨论】:
标签: angular typescript angular2-template