Will too much of ngIf statment in one page in ionic will degrade application speed and performance?

I am working in an Ionic Application and I got I stuck with two choices either to build every single page for each UI design or use dynamic main page with if else condition in html files .


.. .... APPLY NOW
<div *ngIf="role == 'somethingtwo';">
  <ion-row text-center>
    <p>     ....      </p>
    <ion-item no-lines ngFor="let two of tow | async; let ..">

<button ion-button block (click)=“doSomeThing(‘somethingtwo’)” color=“core”>APPLY NOW

Also Please consider the TS file.

Is it good practice? Will the performance of application degrade if I follow the above concept

Please share me your advice


The answer to the question in your title is yes. Use ngIf strategically.

But how long is your list? 5 items? Probably does not matter. Do you use ngIf 20 times on a page? Might be a problem.

Thanks for advice. I will try to do both way and confirm myself. That will be good experience…