I used ng-select
in my project, i removed the cross clear icon using [clearable]="false"
, and i removed also the clear icon for each item by overriding the ng-value-icon
class
:host ::ng-deep .ng-value-icon {
display: none !important;
}
i want to apply the css with condition
constructor() {
if(this.result === "ok") {
//apply the css
}
}
This part of the template (from your Stackblitz) wich decides over the class
custom
relates to a scope var namedstep
:So, use it:
or you change the condition in the template into
Or, most likely better than this css-toggle, you can use
*ngIf
.