您好目前我在我的 {N} 项目中使用 nativescript-telerik-ui 插件并使用如下所示的 RadListView
<RadListView #myRadListView [items]="posts"
loadOnDemandMode="Auto" (loadMoreDataRequested)="onLoadMoreItemsRequested($event)"
itemDeleteAnimation="Fade" [listViewLayout]="layout">
<template tkListItemTemplate let-post="item" let-index="index">
<!--- data goes here -->
</template>
<template tkListViewHeader>
<Label text="next page" [nsRouterLink]="['/next-page']"></Label>
</template>
</RadListView>
在 NextPage 组件中,当用户单击后退按钮 ActionItem 时,我将页面重定向到帖子页面(即 RadListView 页面),如下所示
goBack(){
this.routerExtensions.backToPreviousPage();
}
当“loadOnDemandMode”未触发时,即在列表中加载初始项目时,它工作正常。当使用 loadOnDemandMode 刷新列表并单击下一页并使用 backToPreviousPage() 从该页面返回时,出现以下错误
Feb 1 20:28:36 MacBook-Pro tingrnsapp[39294]: file:///app/tns_modules/ui/core/view-common.js:748:22: JS ERROR TypeError: undefined is not an object (evaluating 'child.onLoaded')
Feb 1 20:28:36 MacBook-Pro SpringBoard[5176]: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
Feb 1 20:28:36 MacBook-Pro com.apple.CoreSimulator.SimDevice.0E8C3B6B-C97F-44B9-8286-697D21C32991.launchd_sim[5159] (UIKitApplication:org.tingr.teacher.prod[0x39cb][39294]): Service exited due to Segmentation fault: 11