You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
Hi @bradmartin ,
For my internship I've been asked to develop a mobile application with Nativescript and Angular 2.
One of the things the app should be able to do is to get the notiffications (which I store in a listview in my app); Obviously i'd like to add the possibility to refresh the list of notifications by pulling down but even though I follow the instructions, I get this error (the one you see as the title of my post).
@ngydat - I don't think that's an issue with the plugin. I'm not a TS expert by any means but why is your error _this.listView.refresh? In this plugin refresh is the event for the PullToRefresh component and not the listview. So just from quickly skimming your code and the error I think your TS code isn't referencing the correct object for your event. Try debugging the event and see what _this. is and also that args.object is the PullToRefresh component when executed.
just updating the component's notificationsList should be enough to cause the listview to update. (I have never used the list control in nativescript-angular though). I would need to see the entire page component to see what you are up to.
Hi @bradmartin ,
For my internship I've been asked to develop a mobile application with Nativescript and Angular 2.
One of the things the app should be able to do is to get the notiffications (which I store in a listview in my app); Obviously i'd like to add the possibility to refresh the list of notifications by pulling down but even though I follow the instructions, I get this error (the one you see as the title of my post).
Here's the view :
<TabView> <StackLayout *tabItem="{title: 'Accueil'}"> </StackLayout> <StackLayout *tabItem="{title: 'Notifications'}"> <PullRefresh:PullToRefresh refresh="refreshList"> <ListView [items]="notificationsList"> <template #item="item"> <Label text="{{item.text}}" textWrap="true" id="notif" [class.boldFont]="!item.status"></Label> </template> </ListView> </PullRefresh:PullToRefresh> </StackLayout> </TabView>
and the refreshlist method I use in a Typescript file :
refreshList(args) { let pullRefresh = args.object; this._notificationService.load() .toPromise() .then(resp => { setTimeout(() => { pullRefresh.refreshing = false; }, 1000); }, err => { pullRefresh.refreshing = false; }); }
The text was updated successfully, but these errors were encountered: