我有这样的月数列表:是否有可能有很多情况下ngIF在角2模板
months = ['1','2','3'...etc]
而且我itterate在数组中的模板:
<table *ngFor="let month of allMonthChannel" >
<months *ngIf =" something "></months>
</table>
问题是如何我可以显示我的月份组件时,月份值只有像3,6,9,12。我应该把什么,而不是“东西”? 感谢答案和索里,我的英语:)
您是在寻找https://angular.io/docs/ts/latest/api/common/index/NgSwitch-directive.html? –