Currently facing a challenge with a significant amount of code here. It is referenced as follows:
"ng-uikit-pro-standard": "file:ng-uikit-pro-standard-8.3.0.tgz",
I am attempting to display a tab between 1 and 3 if a certain condition is met.
Typically, the website layout appears like this:
Tab intro | tab order | tab complete
Tab intro | Tab pre-registration | tab order | tab complete
The usual way to handle this scenario would be:
<mdb-tabset #tabs
<mdb-tab header="Tab Intro">...
<mdb-tab *ngIf="requirePreregistration == true" header="Tab pre-registration">...
<mdb-tab header="tab order">...
<mdb-tab header="tab complete">..
However, the tab is only added to the display if the condition is true.
Tab intro | tab order | tab complete | Tab pre-registration
If the condition is false, the tab remains hidden. This page contains a lot of code. Any suggestions on what can be done?
Below is the TypeScript snippet, in case it is needed:
ngOnInit() {
if (order.type == RequestPaymentType.PreRegister)
this.requirePreregistration = true;
}
I am aware that tabs can be dynamically created. I have attempted to assign them an index; perhaps ChangeDetectorRef could assist with this?
Reference: