问题描述
根据我在
我在2018年看到同样的错误。似乎深层链接和延迟加载不能很好地协同工作。我建议使用以下cordova插件:
According to what I've read in the documentation and forums, you enable deep-linking via : forRoot(appRoot, config, deepLinkConfig)
@ngModule({
..
IonicModule.forRoot(MyApp, {}, {
links:[{ component: ContactPage, name: "contact", segment: "contact"},
{ component: HelloPage, name: "hello", segment: "hello" }
]
})
...
}) ...
This leads to adding ContactPage and HelloPage to declarations and entryComponents arrays within @ngModule
, which would not be lazy-loaded.
So, this leads to the question, can you substitute strings, doing away with the imports and double array declaration, and have this?
@ngModule({
..
IonicModule.forRoot(MyApp, {}, {
links:[{ component: 'ContactPage', name: "contact", segment: "contact"},
{ component: 'HelloPage', name: "hello", segment: "hello" }
]
})
...
}) ...
and achieve lazy-loading at the same time?
Update: Tried with a single Tabs page. I'm guessing it's not working ATM.
I'm seeing same error in 2018. It seems deep links and lazy loading don't play well together. I propose to use the following cordova plugin :
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking
这篇关于Ionic 3深层连接和延迟装载同时进行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!