-
Notifications
You must be signed in to change notification settings - Fork 0
@bynary.composables.attribute
github-actions[bot] edited this page Jul 11, 2024
·
53 revisions
@bynary/composables / @bynary/composables/attribute
Composables to bind attributes on elements.
@Component({
selector: 'my-component',
template: '<ng-content></ng-content>'
})
class MyButton {
isDisabled = useBooleanAttribute('disabled');
constructor() {
bindAttribute('tab-index', computed(() => this.isDisabled() ? '-1' : '0'));
}
}