I am currently working on implementing the following functionality - I have two pre-set classes that are combined with some component variables successfully. However, I now need to include an additional conditional class.
Although the first part is functioning correctly, I am facing issues with the object part:
[ngClass]="['btn-' + buttonStyle, 'btn-' + buttonSize, {'btn-rounded': isRounded}]"
Here, isRounded
is declared as a component @Input()
.
@Input() isRounded: boolean = false;
The desired end result looks like this:
<a class="btn btn-success btn-md btn-rounded">okay</a>