have a fallback route {
path: ‘’,
redirectTo: ‘/form/main’,
pathMatch: ‘full’
},
“ionic serve” does not support HTML5 urls (aka no-hash-bang) so you can force angular to use hashes ionicBootstrap(MyApp, [ APP_ROUTER_PROVIDERS, { provide: LocationStrategy, useClass: HashLocationStrategy }, …
BUT
Of course the ionic navigation does not support this (at least currently) so NavController becomes fairly useless. You either use routerLink/Router.navigate("[/somewhere]") or navigate with ionic without support for angular routes. Maybe one day.
Agree. This is a huge issue for a web project I’ve been working on. I’ve been telling my team that routing is coming. We’ve all been waiting and are beyond disappointed to see it’s still not implemented.
The router implementation is in the codebase, it was just not documented/user ready for this release.
We understand the frustration, and appreciate yall hanging in there.
As for it’s status, it’s code complete.
We have a few internal folks testing it out at the moment to make sure everything works as expected, and it will be in the next RC.
So long story short…
Router/Deep Linker is done. We’re doing testing before it gets released released. It will be documented in the next RC.
We all are programmers and we understand the problems and the time problems for release a new router like this, we know also it is in beta so nothing is for sure.
The problem is some of us, as me, pushed a lot to introduce ionic2 in our company but we also need a url router to create a webapp. And some people as me has to take responsibility and must explain now to management why we are still not able to finish the app, as you know time is money and why we will missing christmas business for our product.
We know it is all in beta, but please don’t say in june it takes a few week (integrating angular2 router) and then after 2 months you say it takes again a few weeks (creating new router) and now after nearly other two months it is still not here.
You all do a incredible good work and we all love ionic2 and your team, but please share more of your road maps and if something will not happen as expected and communicated let us it know as soon as possible.
I hope my personal opinion is understood not wrong!
Thanks, Mike! I took a look at the code and it looks like a config object with a links array gets passed to IonicModule::forRoot, but I’m not clear on how to define a route/link. I see a link can have a name, component, and segment. Is the segment the same format as a path string I’d use in a route object in the angular2 router? I’m sure you have some docs on the way, but any guidance you could provide to help us get started with this would be great.
What about lazy-loading? Is DeepLinker related to lazy-loading? The rc0 upgrading guide refer the angular ngModule page which also mentioned lazy loading. Do it means we can use angular router + lazy loading in ionic rc0? Can you guys provide a simple lazy loadnigrouter example/plunker ? We have a hard time to use lazy loading in rc0. Lazy loading is essential for our app, our app has 50+ pages.
Is there going to be support for lazy loading in ionic 2? I’m starting a project at work and I can’t do it without the lazy loading. The bundle.js file will be gigantic. Is it something you are developing or is it not coming at all? Would be nice to have a straight answer.
After a bit of digging, I have routing working with data. It’s currently using hash location strategy, but I assume that would be straight forward to switch to path location strategy:
Any update here on routing and documentation / tutorials? My app heavily relies on networking and routing which is in ionic 1. I really need to get a win and update here so that I can migrate. I’ve spent the last 2 days trying to work with deprecated libraries for some bits to find that I can’t even move yet to Ionic 2.
Love the platform, looking forward to moving to Ionic 2!
Would be great to see one of the sample apps updated to use DeepLinker. Running into some issues with my tabbed app, where I don’t have explicit calls to this.nav.push() to integrate with DeepLinker.