Setting values to empty before initializing the view

35 views
Skip to first unread message

ashish yogi

unread,
Apr 23, 2018, 6:38:07 AM4/23/18
to KnockoutJS
Hello All,

We have certain web pages in our project. Data on the page is dynamic and handled by knockout. Lets say we have some value for field Item1 on say PageView1. The problem is when user comes to 'PageView1' and navigates away to some other page. By the time, some monitoring data on the page has changed on server-side. Now when I return to 'PageView1', first the old value of Item1 is displayed for some time and then the new value is reflected by knockout. 

I don't want to seperately instantiate this value to null, every time I land on PageView1 as this is the case with many other fields on the page. 
Is there a way to handle this is in a better way in KnockOut ?

PS I am still a noob. 

Thanks,
Ashish

SLG

unread,
May 21, 2018, 5:44:52 PM5/21/18
to KnockoutJS
Are you using a server side rendering and client side rendering together?

Is it a pure SPA?
Reply all
Reply to author
Forward
0 new messages