In my application, I have dashboard component. In the dashboard component OnInit, I call a service that return me a configuration with 3 possible usecases.
Basically the answer is something like that :
{
"usecase": "usecase1" // "usecase2" or "usecase3"
}
For each usecase, the whole dashboard content will not be the same.
I have 3 components for each usecase : useCase1Component, useCase2Component, useCase3Component
I want to know the best way to show/render the right component based on the usecase.
I could maybe do this using *ngIf like this in the dashboardComponent html :
<useCase1Component *ngIf="showUseCase1"></useCase1Component>
<useCase2Component *ngIf="showUseCase2"></useCase2Component>
<useCase3Component *ngIf="showUseCase3"></useCase3Component>
But I'm not sure it's the best way, and I don't see how I could achieve this in another way with good performance.