Closed TradeArcher2020 closed 9 years ago
You have to track each submodel explicit, if you want to observe it. It's the same useful behavior without ECMA5:
self.subVM1 = ko.track(new SubVM1());
Soon, I will make small changes so that you can bypass the objects recursively.
+1
This is implemented as of bcf8f67
@nathanboktae Yes, you are right.
I have a ViewModel defined that contains two sub-ViewModels as properties like this:
Both SubVM's are structured the same way as a normal VM and both call
ko.track(self)
as well.In my markup, I am trying to use the "with:" syntax to specify the use of one of the SubVMs like so:
This binds initially just fine. However, when
SomePropertyOnSubVM1
changes, the UI is not updated. This worked fine when I put the property directly on the main ViewModel and not on the Sub-ViewModel.Any suggestions? Is this a known issue?