Our client has a requirement for deep linking in our hybrid mobile / PWA. We are using a different folder structure than the Ionic default. Our structure is more aligned with the Angular recommendation as folders by feature. We are also using inheritance for several pages. We have a base-provider class, base-grid class and a base-form class.
Right now we do not have modules for each page. We have added a module for some pages to test lazy loading and deep linking. We understand by some of our tests that lazy loading is required for deep linking to work.
Our app crashes when we try to lazy load. It is probably because we aren’t importing and declaring everything needed in the page module for the page to load. It may be due to not including the base classes as well, but we have tried it for pages without inheritance and it did not work. The error says there are missing chunks. We are on the latest version 3.4.2 of Ionic with build scripts 1.3.7 and CLI 3.4.0.
What do you recommend? Ideally we want to lazy load modules by feature and not by page. And we really need deep linking to work. We understand this is an area of interest by many developers and have seen posts about this. Can you give us an update as to what to expect when you do deliver an improvement to this area?
Will we be able to deep link by feature module? Will it work with our folder structure? How will the module be structured? What all do we need to include in a module for it to lazy load? What will be the impact of loading modules that reference code multiple times? Will it duplicate loading of shared modules and components? Are you working on deep linking with parameters going backwards in the navigation path? Right now it uses classes in the history and that will not pass parameters.
Thank you for the great framework. We have seen so many improvements along the way and are hoping these much needed features are given a resolution soon.