我正在尝试使用一个角度组件作为RadListView的模板。
<StackLayout>
<RadListView [items]="stories"
marginRight="-2"
separatorColor="transparent"
height="100%">
<ng-template tkListItemTemplate
let-story="item">
<NewsItem [story]="story"></NewsItem>
</ng-template>
</RadListView>
</StackLayout>我得到以下错误。
file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:57:124: JS错误: onMeasure()没有通过调用setMeasuredDimension() ProxyViewContainer(435)来设置测量的维度
发布于 2018-12-14 21:28:18
弄明白了。模板本身必须有一个容器。
<StackLayout>
<RadListView [items]="stories"
marginRight="-2"
separatorColor="transparent"
height="100%">
<ng-template tkListItemTemplate
let-story="item">
<StackLayout>
<NewsItem [story]="story"></NewsItem>
</StackLayout>
</ng-template>
</RadListView>
</StackLayout>https://stackoverflow.com/questions/53712418
复制相似问题