What is the efficient way to check if a string is present in a list of strings in the ngIf angular directive

This is what I am doing currently but wanted to know if there is a better way of doing it instead of using multiple || expressions.

 <button
            *ngIf="(element.account.status && (element.account.status === 'DRAFT') || (element.account.status === 'PENDING') || (element.account.status === 'REVERT') || (element.account.status === 'REVIEW')); else addDisabled"
            id="add-account" mat-icon-button (click)="openDialog(element.accountType)">
            <img src="../../../../assets/add.svg" />
 </button>
 <ng-template #addDisabled>
            <button id="add-account" mat-icon-button [disabled]="true">
              <img class="intro" src="../../../../svgs/add-disabled.svg" />
            </button>
 </ng-template>

50 thoughts on “What is the efficient way to check if a string is present in a list of strings in the ngIf angular directive”

  1. therapie cognitivo comportementale quebec therapie comportementale et cognitive sarthe , pharmacie ouverte vincennes pharmacie vilalta avignon , Naprosyn moins cher, Acheter Naprosyn 500 mg pas cher. Naprosyn pharmacie France Naprosyn pas cher [url=https://docgofran.asso-web.com/#]Naprosyn moins cher, Naprosyn pas cher[/url] pharmacie avignon arques Finasteride livraison Luxembourg, Finasteride livraison Luxembourg. Finasteride sans ordonnance Luxembourg Finasteride pas cher [url=https://truegosa.asso-web.com/#]Finasteride livraison Luxembourg, Acheter Finasteride 1 mg pas cher[/url] , pharmacie de garde aujourd’hui dimanche pharmacie aix en provence corsy , pharmacie etampes. pharmacie amiens maison de la culture Ivermectine livraison Belgique, Acheter Ivermectine 6 mg pas cher. Ivermectine sans ordonnance Belgique Ivermectine pas cher [url=https://troublestopil.asso-web.com/#]Acheter Ivermectine 6 mg pas cher[/url] , therapies for depression pharmacie de auchan woippy Г  quelle heure Г§a ferme, therapie comportementale et cognitive besancon pharmacie brest kergaradec . pharmacie thoraval brest, traitement jaunisse bebe therapie cognitivo-comportementale clermont ferrand pharmacie en ligne portugal .

    Reply

Leave a Comment