使用 6.0 更新 nativescript-cli 后 nativescript-pager 出错?
Error In nativescript-pager after update nativescript-cli with 6.0?
错误是:-
错误类型错误:无法加载视图:Pager.TypeError:无法读取未定义的 属性 'PagerAdapter'
错误类型错误:TNSViewPager 不是构造函数
示例代码:-
<Pager row="0" [items]="itemList" [selectedIndex]="selectedIndexValue" cache="false" disableAnimation="true" #pager (selectedIndexChange)="onIndexChanged($event)">
<ng-template let-i="index" let-itemS="item">
<GridLayout rows="*">
<Image class="view-animation" row="0" [src]="itemS.path1">
</Image>
<Image class="view-animation" row="0" [src]="itemS.path2"></Image>
<Image class="view-animation" row="0" [src]="itemS.path3"></Image>
</GridLayout>
</ng-template>
</Pager>
终于在 nativescript cli 6.0 中找到了这个问题的解决方案。
- Android问
- 安装 nativescript-pager 最新插件。
错误是:-
错误类型错误:无法加载视图:Pager.TypeError:无法读取未定义的 属性 'PagerAdapter'
错误类型错误:TNSViewPager 不是构造函数
示例代码:-
<Pager row="0" [items]="itemList" [selectedIndex]="selectedIndexValue" cache="false" disableAnimation="true" #pager (selectedIndexChange)="onIndexChanged($event)">
<ng-template let-i="index" let-itemS="item">
<GridLayout rows="*">
<Image class="view-animation" row="0" [src]="itemS.path1">
</Image>
<Image class="view-animation" row="0" [src]="itemS.path2"></Image>
<Image class="view-animation" row="0" [src]="itemS.path3"></Image>
</GridLayout>
</ng-template>
</Pager>
终于在 nativescript cli 6.0 中找到了这个问题的解决方案。
- Android问
- 安装 nativescript-pager 最新插件。