Super-Tabs: ERROR Error: Uncaught (in promise): invalid views to insert

Hi! Thanks for this awesome plugin.
Facing a perplexing issue

  • Using super-tabs inside a Modal

  • Passed an object to the Modal

  • First tab on super tab opens no issues

  • On moving to the second tab the console throws up this error

    ERROR Error: Uncaught (in promise): invalid views to insert
    at d (VM7607 polyfills.js:3)
    at l (VM7607 polyfills.js:3)
    at Object.reject (VM7607 polyfills.js:3)
    at SuperTab.NavControllerBase._fireError (VM7624 main.js:51180)
    at SuperTab.NavControllerBase._failed (VM7624 main.js:51168)
    at VM7624 main.js:51223
    at t.invoke (VM7607 polyfills.js:3)
    at Object.onInvoke (VM7624 main.js:4404)
    at t.invoke (VM7607 polyfills.js:3)
    at n.run (VM7607 polyfills.js:3)
    at VM7607 polyfills.js:3
    at t.invokeTask (VM7607 polyfills.js:3)
    at Object.onInvokeTask (VM7624 main.js:4395)
    at t.invokeTask (VM7607 polyfills.js:3)
    at n.runTask (VM7607 polyfills.js:3)

  • But the page renders as required.

  • On changing tabs the error is not replicated

I have a suspicion this bug is related to #10046

The Modal is called:

loadDetails(x){
     let mod = this.modalCtrl.create(XPage,{x: x});
     mod.present();
}

Inside the XPage.ts

d: any = DPage;
c: any = CPage;
r: any = RPage;

constructor(public params: NavParams, private viewCtrl: ViewController){
	this.job = this.params.get('x');
}

dismiss(){
	this.viewCtrl.dismiss().catch(()=>{console.log("Y u no print bwoy!");});
}

Inside XPage.html

 <ion-content class="pp">
    <super-tabs>
   	   <super-tab [root]="d" title="d" [rootParams]="x">D</super-tab>
  	   <super-tab [root]="c" title="c" [rootParams]="x.y">C</super-tab> 
	   <super-tab [root]="r" title="r" [rootParams]="x">R</super-tab>
    </super-tabs>
 </ion-content>

Inside CPage.ts

constructor(public params: NavParams){
     this.recruiter = this.params.data;
 }

@ihadeed Please help!

Apologies for the above there is no issue here!
The variable assigned to the last tab was misspelled.

:grimacing:

1 Like

Please post the issue on Github, along with the version of ionic framework
that you’re using.