i am currently experimenting with this piece of code
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<button [ngClass]="{'btn': showDirectiveContent === false ? 'btn btn-danger': 'btn btn-success'}">
<b *ngIf="!showDirectiveContent; else noServer">Display Details</b>
<ng-template #noServer>
<b>Hide Details!</b>
</ng-template>
</button>
the *ngIf directive is functioning very effectively, I also attempted to use [ngStyle] [ngStyle]="{backgroundColor: i > 4 ? 'green':'' Directive is working as expected, unfortunately I encountered difficulties with the ngClass Directive, after researching it appears to be a common issue with no clear solutions.