I have a run into an issue that is causing problems for us on our project. Instead of going into a lengthy description, here is a jsFiddle that demonstrates the issue: http://jsfiddle.net/pRMfN/1/
What I'd expect to happen when you click the button is that both divs are refreshed to output true, but instead only the div that is bound to the viewModel directly is refreshed, while the div that is bound to the child observable object is not.
Am I doing something wrong? Is this behavior by design? I realize that this is a contrived example and I could use spans with text bindings instead of templates to accomplish the same thing here, but on our real-world project this is an issue because we must use templates on a particular page (for various reasons) and we'd like to bind to a child object to reduce the number of times a template is re-rendered to improve performance (there are other child objects that are updated independently of the one in question), but when we do, the template is only called once, and not refreshed each time a value inside it changes.
Thanks for any assistance,
Jonathan
What I'd expect to happen when you click the button is that both divs are refreshed to output true, but instead only the div that is bound to the viewModel directly is refreshed, while the div that is bound to the child observable object is not.
Am I doing something wrong? Is this behavior by design? I realize that this is a contrived example and I could use spans with text bindings instead of templates to accomplish the same thing here, but on our real-world project this is an issue because we must use templates on a particular page (for various reasons) and we'd like to bind to a child object to reduce the number of times a template is re-rendered to improve performance (there are other child objects that are updated independently of the one in question), but when we do, the template is only called once, and not refreshed each time a value inside it changes.
Thanks for any assistance,
Jonathan