Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

Update entry field display on home page - ionic/angular [RESOLVED]

Another newbie question!

I am using App Designer, Ionic/Angular, with a controller in app.js.

My home page is a form where filter values can be entered by a user, and I save the entered ng-model values into indexedDB, and these filters are used for a REST request on a listings page.

Everything is working except...

When the app starts I get the filter values from the indexedDB and assign these values to my ng-model fields. If I log these values to console I can see that everything has worked, but the page fields don't get updated - UNTIL I click on fields on the page, or go to the listing page and back again. IOW some event is needed to update the display of the values in my filter fields.

Is this some sort of timing issue? Is the page loading before/after I have the values from the DB? What can I do to resolve this? I notice that the latest release of IntelXDK has a function that allows me to easily check for document ready, can I use that to resolve this problem?

TIA!

Tags (2)
0 Kudos
2 Replies
Highlighted
9 Views

can you post your code ?

0 Kudos
Highlighted
Beginner
9 Views

Hello Rakshith,

I resolved my problem by calling the timeout function, which refreshed the model variables on the screen...

$timeout(function(){$scope.gotoHome();}, 100);

Is this a reasonable way to refresh the screen?

0 Kudos