SteveSanderson/knockout — Issue #340: Binding NameSpaces
Author: GilesBradshaw
Created: 2012-02-23 16:58:55+00:00
State: open

I was thinking about my application and how to bind markup to more than one model. For example Im might have one model for data and another model for currently selected display options. I wonder if it would be possible to add a namespace to the applyBindings function so I could for example do :

ko.applyBindings(viewModel, $("#myNode")[0], "model");

and also

ko.applyBindings(displayOptions, $("#myNode")[0], "displayOptions");

Each binding would have a means of defining a namespace it was for. Thus I could bind display properties to one model and content to another without knowing how these models are related.