After setting up lazying loading for all the pages and pipes, i realized that my app is acting weird when i refresh the page on a browser.
I got the following error:
TypeError: Cannot read property ‘indexOf’ of null
at Tab.NavControllerBase._cleanup (http://localhost:8100/build/main.js:63214:59)
at Tab.NavControllerBase._transitionFinish (http://localhost:8100/build/main.js:63116:18)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14529)
at Object.onInvoke (http://localhost:8100/build/main.js:4499:37)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14469)
at n.run (http://localhost:8100/build/polyfills.js:3:9741)
at NgZone.run (http://localhost:8100/build/main.js:4368:62)
at Array. (http://localhost:8100/build/main.js:63064:25)
at MDTransition.Animation._didFinish (http://localhost:8100/build/main.js:36299:29)
at MDTransition.Animation._playProgress (http://localhost:8100/build/main.js:35638:18)
at MDTransition.Animation._playDomInspect (http://localhost:8100/build/main.js:35603:14)
Update: it is caused by ion-tab’s nav-controller-base’s clean up function after refreshing the page.
https://github.com/driftyco/ionic/blob/41e34fc4ce08444330d0c7781c367dce1e6ee0a1/src/navigation/nav-controller-base.ts