3
据我在documentation和forums读过,启用深度链接通过:forRoot(为approot,配置,deepLinkConfig)离子3深层链接和延迟加载在同一时间
@ngModule({
..
IonicModule.forRoot(MyApp, {}, {
links:[{ component: ContactPage, name: "contact", segment: "contact"},
{ component: HelloPage, name: "hello", segment: "hello" }
]
})
...
}) ...
这导致增加内@ngModule
ContactPage和HelloPage到声明和entryComponents阵列,这将不会是延迟加载。
所以,这导致了一个问题,你可以替换字符串,取消导入和双数组声明,并有此?
@ngModule({
..
IonicModule.forRoot(MyApp, {}, {
links:[{ component: 'ContactPage', name: "contact", segment: "contact"},
{ component: 'HelloPage', name: "hello", segment: "hello" }
]
})
...
}) ...
并实现延迟加载的同时?
更新:尝试使用单个选项卡页面。我猜这不是ATM工作。
我得到同样的问题,你有没有找到解决办法? @jgfmk –
我刚刚停止使用深度链接和延迟加载。延迟加载阻止了其他功能在我的应用程序IIRC中的某处运行。但我不记得现在是什么 - 这是很久以前的事了!对不起,我不能更有帮助。 – JGFMK