angular - Ionic Deep Linking -


i've created first ionic app deep linking. had give on lazy-loading deep links now... i'm confused way urls stay around when navigate elsewhere, home page. how people working round this? doing kind of url rewriting? or doing to, break else? seems can't wipe out url either, comes again.

i've seen ionic blog, , heated discussions in github issues behaviour.

it seems @ionicpage gives control on customising stuff, lazy-loading/modules right? or can use annotation without lazy loading?

any advise on how best work appreciated.

i noticed other weird behaviour, in data structure used hold reference homepage, became undefined, though exported constant. initial rootnav when app launches. had kludgy hack work around it, conditioning it

if (page.home != undefined) { //bug in ionic perhaps    this.nav.setroot(homepage, params)    .catch((err: any) => {           console.log(`didn't set home root: ${err}`);    });  } else {    this.nav.setroot(page.component, params)    .catch((err: any) => {           console.log(`didn't set nav root: ${err}`);     }); } 

chrome console.log chrome console.log

pageinterface data structure page interface

part of constant lost 'homepage, in component key of class i'd imported. code lost component

is others have experienced? advice, or glaring errors i'm not seeing. cheers.

first of navigation in ionic quite buggy since version 3.6.0 (especially tabs) refactored way urls generated (they more readable now). mentioned there many open issues on github fixed in next few weeks according team (they busy refactoring whole framework v4 of ionic).

to answer question regarding ionicpage decorator: can use without lazy-loading pages: in main module app.module.ts add following:

imports: [     browsermodule,     ionicmodule.forroot(myapp, {       preloadmodules: true     }) ], 

preloadmodules: true tells ionic want load pages eagerly (not lazy). , in ionicpage decorators can configure priority modules loaded on startup:

@ionicpage({   name: 'my-page',   priority: 'high' }) 

for priority property values high, low , off available. off means page lazy-loaded. can find in documentation of ionicpage decorator.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -