Skip to content

@bynary.composables.attribute

github-actions[bot] edited this page Jul 11, 2024 · 53 revisions

@bynary/composables / @bynary/composables/attribute

@bynary/composables/attribute

Composables to bind attributes on elements.

Example

@Component({
   selector: 'my-component',
   template: '<ng-content></ng-content>'
})
class MyButton {
    isDisabled = useBooleanAttribute('disabled');

    constructor() {
        bindAttribute('tab-index', computed(() => this.isDisabled() ? '-1' : '0'));
    }
}

Index

Interfaces

Functions

Clone this wiki locally