I have the same code double - is there a better way to do that? Maybe it’s possible to use only the function doRefresh() and in ngAfterViewInit() i start also doRefresh. But how? In HTML I start the function with doRefresh($event).
And my second problem the LoadingCtrl is not working in the refresher (I know I have deleted in the code above). I get the error: Subscriber.js:229 Uncaught EXCEPTION: Error in build/pages/events/events.html:12:17
ORIGINAL EXCEPTION: Attempt to use a destroyed view: detectChanges
thanks for you fast response.
I do not know if I understand you correctly. When I start my app I load the data (getAllEvents). The LoadingCtrl is working.
Now a user would like to reload the data. The user push down (ion-refresher starts the doRefresh) and the data to be reloaded. And that is my problem. When I reload the data the LoadingCtrl ist not working. He crash the app with the error above. Without the LoadingCtrl it works fine.
My problem is not scrolling or loading the data partially
but when I try this, refresh is starting, I see the spinner and the app do nothing. I think the app crash. It’s impossible to do something in the app. Only refresh the browser.