Hi,
I am following the Ionic Conference App and creating a similar Tab based Applicatoin. I see that the Tab pages are eagerly loaded rather than lazy loaded with following code (from ionic-conference-app)
import { AboutPage } from '../about/about';
import { MapPage } from '../map/map';
import { SchedulePage } from '../schedule/schedule';
import { SessionDetailPage } from '../session-detail/session-detail';
import { SpeakerDetailPage } from '../speaker-detail/speaker-detail';
import { SpeakerListPage } from '../speaker-list/speaker-list';
const routes: Routes = [
{
path: 'tabs',
component: TabsPage,
children: [
// tab one
{
path: 'schedule',
component: SchedulePage,
outlet: 'schedule'
},
{
path: 'details/:sessionId',
component: SessionDetailPage,
outlet: 'schedule'
},
I don’t have a solution for you, but I can confirm that the same thing happens in my app when I try to lazy load the children pages
EDIT: I still don’t have a real solution to this, but here’s a hint for anyone that knows this better than I do:
I’m using Chrome, and what is happening is the <page-whatever> tag is the height of only the toolbar and footer… it doesn’t have enough height for the content… setting it in Chrome in the element style to min-height: -webkit-fill-available; pushes the toolbar to the top, but the content still doesn’t show until you add the same css to the <ion-content element…
Obviously, this is not a real fix, but it does enable you to show your page the way it should look (in Chrome at least)… I’m sure it’s a bug, but I still have to figure out what the correct way to do this is without breaking stuff when the bug is fixed
Even after npm install @ionic/angular@4.0.0-beta.15 --save I am also still having the issue of a lazy loaded child route page being pushed all the way to the bottom. blackfan23’s solution seems to work as a fix.
Hi ! Did you guys find a solution ? Because I am also trying to deal with it, but all the related issues had been closed, and the problem remains. What shall I do ?
I actually had the same issue while trying to lazy load tabs and just figured I didn’t understand something about lazy loading…I was so confused by the content suddenly showing up at the bottom of the page, so weird
I then quickly reverted back to eagerly loaded tabs…
Thanks for your tip. Have you tried to check if your tabs are really lazy loaded using the augury chrome extension?
I tried, and I’m still getting the same picture as @_oliver posted above. It just says “EmptyOutletComponent” which routes to my page, but [Lazy] is nowhere to be seen…
I didn’t try, but I used the layers and saw the hidden component. Maybe there’s something different within version.
But since I used that workaround, all is working, so I’l first use that, before the next version of ionic is released.