I’m trying to load tabs dynamically as per category name but it gives error invalid views to insert
.html code
<super-tabs scrollTabs="true" *ngIf="tabsLoaded">
<super-tab *ngFor="let item of subcategorytitless" [root]="GeneralPage" [title]="item.category_name"></super-tab>
</super-tabs>
.ts code
this.authService.showchecklistrecord(this.userData).then(result => {
this.responseData = result;
this.tabData = this.responseData.subcategorytitles;
this.aa = this.tabData;
this.subcategorytitless = this.aa;
for (let i = 0; i < this.subcategorytitless.length; i++) {
this.tabname = this.subcategorytitless[i].category_name;
console.log("tab name", this.tabname);
this.pages = {
[this.tabname]: GeneralPage
}
this.tabsLoaded = true;
}
// this.tabsLoaded = true;
}, (err) => {
//Connection failed message
// this.showError(err);
});
i got the category name (tabname) randomly means as per click on list i got 3 or 4 or 2 category and i want to load that category in tabs dynamically, stuck with this problem please help me…