I have a "options" binding dropdown that looks like the following:
<select class="form-control" data-bind="options: baseViewModel.filtersViewModel, optionsCaption: 'Choose...', optionsText: function(self) { return self.Name }, value: baseViewModel.baseFilter(), optionsValue: 'Value', event: { change: function() { console.log('test'); applyFilter(baseViewModel.baseFilter()); return true; } }">
<option value="">Choose...</option>
<option value="{'sort':[]}">water group</option>
</select>
I am using this binding in various places in my application, is there anyway to declare the entire contents of the data-bind="contents" and pass it in (inject?) as a string or a javascript object? I have examined preprocessing bindings, however, I am not sure if this is what I am looking for.