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

后端 未结 12 1681
情书的邮戳
情书的邮戳 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 15:07

    i had the same problem and i can resolve this creating the archive module.ts for mi page in this case was tabs

    import { TabsPage } from './tabs';
    import { NgModule } from '@angular/core';
    import { IonicPageModule } from 'ionic-angular';
    
    @NgModule({
        declarations: [
            TabsPage
        ],
        imports: [
          IonicPageModule.forChild(TabsPage),
        ],
        exports: [
          TabsPage
        ]
    })
    export class MenuPageModule { }
    

    only in case this was added the import,declarations and entryComponents in the app.module.ts file remove that. All this process work fine to me.

提交回复
热议问题