twoWayBinding
function
Creates a two-way binding.
@parampublicName
stringPublic name of the two-way compatible input.
@paramvalue
WritableSignal<unknown>Writable signal from which to get the current value and to which to write new values.
Usage example
In this example we create an instance of the MyCheckbox component and bind to its value
input using a two-way binding.
const checkboxValue = signal('');
createComponent(MyCheckbox, {
bindings: [
twoWayBinding('value', checkboxValue),
],
});
@returns
BindingJump to details