How to dynamically set component host style Angular 8

Discussão em 'Angular' iniciado por Mario Petrovic, Outubro 4, 2024.

  1. I want to dynamically set style for child host component element from parent.

    There is a solution to do it individually for each style as:

    @HostBinding('style.width') @Input() width = 'auto'

    But this way i need to make multiple lines for different styles.

    Bellow is a solution to do this with Host binding and input combination.

    Continue reading...

Compartilhe esta Página