Closed christo8989 closed 8 years ago
I'm creating a custom binding and trying to unwrap the observables that are being returned.
I realize that I could setup the object to take the value instead of the observable, but I don't think it should be necessary to do that.
var bindings = { value: ko.observable('some value'), }; ko.bindingHandler.custom = function () { init: function (element, valueAccessor, allBindings, viewmodel, bindingContext) { var option = ko.unwrap(valueAccessor().value); }, };
This is a super basic example of what I'm trying to do.
Nvm. My code was doing something unexpected.
I'm creating a custom binding and trying to unwrap the observables that are being returned.
I realize that I could setup the object to take the value instead of the observable, but I don't think it should be necessary to do that.
This is a super basic example of what I'm trying to do.