In the example above, should the page with id test2 share the same context as the <h2> element?
Currently any events that occur on the node are supplied by the parent context. In other words, the viewModel that would get loaded into the context 2 does not control its own events.
If so, another custom binding could be created called something like: page-loader That specifies an html path that loads this other page and then replaces the page-loader with the page itself.
Currently the container element that the
page
data-binding is on, is in a different bindingContext than it's contents.ex:
In the example above, should the
page
with idtest2
share the same context as the<h2>
element?Currently any events that occur on the node are supplied by the parent context. In other words, the
viewModel
that would get loaded into thecontext 2
does not control its own events.Is this a problem?
If so, here is a reference of getting the outer-html to share bindingContext: https://github.com/mbest/knockout-repeat
If so, another custom binding could be created called something like:
page-loader
That specifies anhtml
path that loads this otherpage
and then replaces thepage-loader
with the page itself.