【发布时间】:2018-09-18 14:46:47
【问题描述】:
通过 *ngFor 调用模板时,无论多么简单,它都不会被渲染。
component.html:
<Label text="hello world""></Label>
container.html:
<StackLayout> <GridLayout *ngFor="let obj of objs"> <!-- WORKS: --> <Label text="hello world"></Label> <!-- DOES NOT WORK: --> <ns-component></ns-component> </GridLayout> </StackLayout>
当使用 ,(简单的、非模板标签)下的 sn-p 时,对于 3 个对象的数组,我看到三行“hello world”。但是,当调用模板而不是简单的 Label 时,不会呈现任何内容。
【问题讨论】:
标签: nativescript angular2-nativescript