1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Angular: Is it possible to compose attribute-selector components transparently?

Discussão em 'Angular' iniciado por Dino Prašo, Novembro 1, 2024 às 05:52.

  1. Dino Prašo

    Dino Prašo Guest

    I am using a component library in Angular. They provide a button component with the selector button[extButton], since we usually don't want to wrap buttons in another custom tag and having to proxy the various actions.

    However, I want to have my own button components, let's say with the selector button[appButton]. Is there any way to apply both components, but just using <button appButton> in the temples. I don't want to reference the attribute from the library directly in case we decide to change the library or implementation of the button.

    Is this possible? I've tried extending the component, and using host.[extButton] = 'something' in the decorator to pass some necessary attribute values but it doesn't seem to be working.

    Continue reading...

Compartilhe esta Página