Based on the large number of app scenarios that depend on new data
being available to the client without a reload, it surprises me that
ko doesn't support this. Even when I make certain portions of my
viewmodel observable so they can be replaced with the new data, side
effects abound. This is disappointing.
My main scenario is a search page that allows the user to search as
many times as they choose with different criteria and rendering the
results in a foreach. No combination of re-binding or not, or
observable or not, seems to get the desired results. I'll be posting
a jsFiddle later to demonstrate the issue and hope that someone can
show me the recommended way to handle the scenario.
My only fix that works is to clone any node with a foreach and keep it
as a clean template and shove a copy back in the dom every time the
data needs to change and be bound again. This way I am always binding
clean markup.
I vote for allowing things to be rebound as many times as we want. I
may branch ko and introduce the capability myself if someone wants to
point me to why the support isn't there in the first place.
Thanks,
Stoney