I like the Lazy Loading but certain modules do not work with it.
eg: Videogular, Dragula ( to my experience )
Is there a way to use lazy loading for some pages and deep links with others?
I have LazyLoading working with the .module.ts files and @IonicPage decorators.
Now I want to load some pages without LazyLoading so that their included modules will work.
Using the following works but Lazy Loaded pages now do not.
IonicModule.forRoot(MyApp,
{}, {
links: [
{ component: HomePage, name: 'HomePage', segment: 'home' },
{ component: UnitPage, name: 'Schedule', segment: 'unit/:id' },
]
}),
Removing that makes Lazy Loaded pages work but DeepLinked pages do not show the segment id in the url.
I have tried this method: ref:
this.deeplinks.routeWithNavController(this.nav, {
'/home/': HomePage,
'/unit/:id': UnitPage,
}).subscribe((match) => {
console.log('Successfully matched route', match);
}, (nomatch) => {
console.error('Got a deeplink that didn\'t match', nomatch);
});
This enabled me to utilize Dragula, for example.
But, the url does not display the segment id.