Nativescript 本机脚本列表模板绑定不工作

Nativescript 本机脚本列表模板绑定不工作,nativescript,angular2-nativescript,Nativescript,Angular2 Nativescript,我无法使用ListView和template进行工作绑定 <ListView #userListView [items]="usersViewList" (itemTap)="onItemTap($event)"> <template let-user="item" let-i="index"> <GridLayout columns="auto"> <Label [text]="user.name" co

我无法使用ListView和template进行工作绑定

<ListView #userListView [items]="usersViewList" (itemTap)="onItemTap($event)">
    <template let-user="item" let-i="index">
        <GridLayout columns="auto">
            <Label [text]="user.name" col="0"></Label>  
        </GridLayout>
    </template>
</ListView>
什么也没发生

绑定上下文已正确设置为usersViewList中的项。但不会将任何更改传播到单个列表项

谢谢你的建议

以后不能调用user.name(猜测组件文件背后的代码?)。 如果您需要访问点击的项目,您可以使用点击项目的索引,然后您可以从项目数组中获取它,如

usersViewList[index].name
您还有itemTap,它为您提供了参数,您可以在这些参数中直接访问被点击的索引,如show


在本例中,最佳实践是将代码与演示完全相同情况的示例进行比较。你可以找到一个。同一个应用程序还有许多其他示例。

换句话说:绑定到绑定上下文对listview项不起作用。
usersViewList[index].name