在我的NativeScript应用中,有一个BottomNavigation标签:
asadmin>flush-connection-pool __db
在这些子选项卡之一中,有一个项目的RadListView:
const routes: Routes = [
{
path: 'tabs',component: TabsComponent,children: [
{
path: 'feed',loadChildren: '~/app/pages/feed/feed.module#Feedmodule',component: NSEmptyOutletComponent,outlet: 'feedTab'
},{
path: 'notification',loadChildren: '~/app/pages/notification/notification.module#Notificationmodule',outlet: 'notificationTab'
},{
path: 'create',loadChildren: '~/app/pages/create/create.module#CreateModule',outlet: 'createtab'
},{
path: 'profile',loadChildren: '~/app/pages/profile/profile.module#ProfileModule',outlet: 'profiletab'
}
]
}
];
导航到该选项卡时,列表将按预期填充,但是如果您导航到另一个选项卡的子组件,然后直接回到BottomNavigation:
子组件:
<actionBar id="profile-action-bar" title="Notifications"></actionBar>
<GridLayout>
<RadListView separatorColor="transparent" class="notification-list" [items]="notificationList"
(loadmoreDataRequested)="onLoadmoreItemsRequested($event)" loadOnDemandmode="Auto"
(itemTap)="onNotificationTap($event)">
<!-- (itemTap)="ongoalTap($event)" -->
<ng-template let-item="item" let-i="index">
<ns-notification-item [item]=item [position]=i></ns-notification-item>
</ng-template>
</RadListView>
</GridLayout>
ListView中先前加载的所有项目均已消失...但是之前未加载的项目将开始填充列表