Within a component called app-test
, the following code is present:
@Input({ transform: booleanAttribute })
reverse: boolean = false;
@HostBinding('style.flex-direction')
direction: string = this.reverse ? 'column-reverse' : 'column';
If the designer adds the reverse
attribute to app-test
like so:
<app-test reverse></app-test>
Then Angular will apply
style="flex-direction: column-reverse"
to the app-test
element.
I am curious about how to utilize Angular signals to ensure that when reverse
is true, the direction is set to column-reverse
. Any suggestions?