【发布时间】:2018-08-04 20:29:50
【问题描述】:
我正在尝试在我的应用中实现ionic deeplinker。我正在尝试使其适用于它自己的模块中的页面,即延迟加载页面。
这是我在 app.module.ts 中的内容
IonicModule.forRoot(MyApp,{},{
links:[
{ component: HomePage, name: 'Home', segment: 'home' },
{ component: DemoPage, name: 'Demo', segment: 'demo/:postId' ,defaultHistory: [HomePage] },
{ component: 'OtherPage', name: 'Other', segment: 'Other' ,defaultHistory: [HomePage] },
]
请注意,otherPage 是用引号引起来的。我想延迟加载它。
other.module.ts如下。
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { OtherPage } from './other';
@NgModule({
declarations: [
OtherPage,
],
imports: [
IonicPageModule.forChild(OtherPage),
],
})
export class OtherPageModule {}
如何实现延迟加载和深度链接。
请注意,我使用的是标签模板。这是 github 上标签上的一个问题,而不是 working with deeplinking
谢谢
【问题讨论】:
标签: angular ionic-framework ionic3