Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Should I be running manual change detection? If so why?
Post Body

I have just completed migrating an Ionic 3 Angular app over to Ionic 4 and all of my screens that used to update in realtime (either from Firestore or direct API calls) are now not updating. Sometimes even the initial page load does not update with the data being pulled from my API.

I can see all the data coming back in the console and can see Firestore triggering in the application code.

Even a simple this.contacts.push(newContact) does not show the contact on the screen until I click away and come back.

I've spent a good hour Googling this and most of the answers are suggesting I run detectChanges() which is surely crazy as the base role of Angular is to detect change either by default or push strategy.

I really hope I am just finding bad advice on Google - my app is very focused on realtime updates that are time sensitive. Adding manual change detection in everywhere is not ideal at all.

This page dives into some of the issues I am having, although a bit old. Again it wraps up with 'run change detection manually'

https://forum.ionicframework.com/t/ionic-4-beta-12-view-sometimes-doesnt-update-on-data-change/143667/4

Please help!!!!

Author
Account Strength
90%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
691
Link Karma
293
Comment Karma
398
Profile updated: 1 day ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago