Lazy load pages random error:ERROR Error: Uncaught (in promise): invalid link:

后端 未结 12 1687
情书的邮戳
情书的邮戳 2021-01-01 14:35

I run into the following error every now and then.

ERROR Error: Uncaught (in promise): invalid link:MenuPage
    at d (polyfills.js:3)
    at l (polyfills.j         


        
12条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 14:59

    According to your error, it looks like you are trying to use the class name MenuPage as a deep link. this.navCtrl.push('MenuPage');

    ERROR Error: Uncaught (in promise): invalid link:MenuPage
    

    In your case, you declared the deep link as "menu". So you should use:

    this.navCtrl.push('menu');
    

    Or if you want, keep using the class, but without quotes: this.navCtrl.push(MenuPage);

提交回复
热议问题