Multiple Knockout binding.
I want to use just one apply binding instead of two apply binding. One is variable other is function. i am using requireJS also.
HTML:
<button id= "Hand" name="Hand"
data-bind="click: Handler2">
</button>
KnockoutJS
function (ko, $)
{
function DM1ViewModel() {
var self = this;
self.bId = ko.observable('TEST456');
}
$('#hide').hide();
var DMD2 = {
Handler2: function() {
window.location='http:www.google.com';
}
};
ko.applyBindings(new DM1ViewModel(), document.getElementById('Container'));
ko.applyBindings(DMD2);
});