In this case, it is very easy for me to handle main page, header, footer and load dynamic content in the router-outlet which are my pages. Also I had a Menu Button which loads only a DIV for my menu.
This new DeepLinker/Router in Ionic is very different and I wait a lot to get the get it, but now it is here and I’m still not sure how to implement the classical angular, webapp/ PWA way with the new ionic2 way.
As someone looking to use my app as a website as well. Can you point me to any resources on how I could go about implementing lazy loading within the current framework? I understand the Ionic team is not planning on supporting this but I would like to see if it would help out my implementation.
Hi @mhartington, I understand your objection but let me explain what we intend to do.
We are creating a Smart Environment product and try to use one code for apps and webapp and next we will also support PWA. We know the UX for app is not the same as for a webapp. But we are trying to create an UX which works good for webapp and also for app, someone perhaps don’t like it but for now we believe in it.
Our actual app is only a RESPONSIVE WEBPAGE which works great on pc and on mobile browser with same UX and our customers love it. Now we try to create a new hybrid APP with ionic2 which on other project we have done works great. But in our SmartEnivronment case the UX is different from a classical APP.
For example, we have always the same toolbar on the top, which content doesn’t change on different pages. So we think in a world where you can use same code for app and web/PWA to do this is legit, or not?
So we try to have an static main page where we can load only new content in main div. In our project we also use third part widgets which will load dynamically in browser, we have something like an appstore which loads code to gateway and this will be load dynamically with angular.
In angular2 this works great, router as dynamic loading. We love your ionic components and your stability and integration with cordova and as we need an installable app from playstore we would like to use ionic2 which is great.
So do you thinkg, are we able to have a static main page with always the same header and load the new page in there?
We try to do something like this, which doesn’t really work:
Is there any way to get to the deepLinkConfig from a component? The Ionic side menu template creates a this.pages array to populate the side menu. I would like to be able to populate it from the deepLinkConfig so not to have redundant data structures.
Also I need to be able to create a breadcrumbs component. I see I can access the navController and use the getViews method to get an array of views, but I have no way to know what the name of the component is from the deepLinkConfig. Any way to do that?
I created a provider that contains my deepLink config and is instantiated in my app.module.ts file and passes in the links array. I then also use the same provider in my app.component.ts file to provide the menu links. But I still have not way of knowing the exact paths when entering a view component to then make a breadcrumb. Maybe if I use the defaultPath property in the links config, I can rely on that for my breadcrumb when the config does not show where I’ve been in the case of coming from a deep link.