-
Notifications
You must be signed in to change notification settings - Fork 3k
Angular 1.4 router and ui-router future #1759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And to add on, will Angular 1.4 have any breaking updates to the current stable build of UI Router? |
yup I'm responsible for the new router in angular core. I've been getting similar questions, so I thought I'd join in on the discussion. I can't speak for this project, but anyone interesting in guiding the new router is welcome. I'd be grateful to have @nateabele and co's help. Because routing sits at the top of your app, it's probably the most important part of migration. For apps that want to go Angular 1.x to Angular 2, the new router has features that will smooth this transition. I'd like to work together to make it possible to either adapt route configs for ui-router to work with the new angular router, or make it easy to slowly route-by-route transition from ui-router to the new angular router. I do not maintain a large angular app written with ui-router, so I'm hoping to have feedback from developers interested in this. But I'm open to supporting this effort however I can. :) |
My team maintains an angular app with ui-router, and we're looking at transitioning to the new router. I'd be happy to help. |
@btford We have a large app using ui-router with lots of nested routes and even using lazy-loading. Would love to chat more about how to transition. |
Hi everybody, I'm finally getting un-buried from travel and moving. So, here's the deal. We're in the final planning stages of throwing everything we've been working on over the past few months into a 1.0 release, which will expand significantly on the current feature set of UI-Router. This release will introduce several new APIs and, while we're not breaking anything, several current APIs will eventually be deprecated. So, all that leads to the obvious question: what do you do with your app? I think it comes down to one thing: does your app's architecture (or your brain) fit better within a state-machine paradigm or not? Both answers to that question are equally valid. If you answered yes, get ready for the best UI Router yet. If not, then @btford and I look forward to your help in developing a transition plan to New Router. From what I've seen so far, I don't think it'll be terribly difficult. Thanks everyone for your interest. |
I have an app using ui-router and has some complex nesting and routing. However, I am going to start on a new app and I am wondering if I should use the new router or the ui-router. |
@nateabele they announced @ ngconf that the new router will help facilitate in the migration to Angular 2.0. How do you see ui-router playing a role in that w/ the 1.0 release? Also, in Angular 1.5 lazy loading is coming out of the box, is this on the timeline for ui-router? I know there is a third-party module but just curious if you see that coming to the core. |
@joshikeerti It's really going to depend on your app. The main use cases that UI Router was designed around were nested & parallel views and routes, which New Router handles perfectly. @amcdnl Those plans are still in motion so it's hard give an exact answer. For now, suffice it to say that, while the original reasons UI Router came into being are mostly obviated by New Router, it has evolved to a place where I still feel that it fills an important gap in terms of the design of complex application architectures. Having said that, my goal is to build off of the advances of 2.0 in general and 2.0 Router in particular as harmoniously as possible.
Yes. More on that soon. |
👍 |
I truly hope both routers can co-exist in parallel. I have a feeling we'll stick around with the UI router for as long as we can. |
I've been going through the ngNewRouter docs and discussions, and I'm wondering if the following deduction i've made is correct: ui-router's 'resolve' mechanism is not available with ngNewRouter, so app developers would have to move resolution logic into the component's canActivate hooks to resolve promises before route activation? |
I made a similar comment in an Anyway, point is... To me, browser urls are a side feature, even though for most apps it's the primary use case. You always need to transition the app by activating and deactivating components, and passing along arguments. In most of those cases you'll get the arguments from the URL, and there will be a path associated with the state you're going to. But, like in our case, not always. So... for my team the key question in any migration to Angular 2 is, how do I build an app that doesn't require paths for routing? Right now the new Angular router does, but there may be plans to support it down the road, but I can't really tell. The issue is tagged for a future release, but I haven't really come across any discussion of potential apis, so I dunno if it's a major priority or not. If anyone is interested, the relevant discussion is here: This is one of those cases though where I wonder if it's just not what the new router is for, and maybe cases like this is where ui-router will continue to be used. But if so... what does the ui-router-based angular 2 upgrade path look like in theory? |
We plan to make ui router work with angular 2, but there is nothing concrete yet. Once 1.0 matures, we will put more thought into what that will look like. Our longer term goal is that ui router be agnostic to the framework it's running in (angular1, angular2, react?) That said, I suspect as new router evolves it will start addressing some of the "corner" use cases that ui router handles. |
UI-Router 1.0 preview is available: https://github.com/angular-ui/ui-router/tree/feature-1.0 |
@christopherthielen I'd love to see future-state integration out of the box. ;) |
@amcdnl me too! |
Hi all, |
Can I read more about the 1.0 somewhere? Or that readme is all there is? |
@fxck For now there is https://github.com/angular-ui/ui-router/tree/feature-1.0 |
Ok, Angular 2 beta is here. What's new about ui-router usage with ui-router? |
I've begun work on UI-Router 1.0 + ng2 |
👍 |
👍 Yea-a-a-a-h!!! |
Great, ui-router rocks! I hope to use future states. |
@christopherthielen If there's anything I could add, please don't make the same mistakes as done in default A2 Router. I'm referring you to angular/angular#5875 and angular/angular#6634 Mostly it's about creating/destroying components and passing input/output. Using a router shouldn't lead to much changes in component code when we decide to transform it to a route component. I agree with angular/router#121 too. |
Here here, a component is a component regardless of whether or not it's activated by a route. At least, it would be nice if that were the case. |
We have a ui-view (like router-outlet), which can be filled with any component based on activated state. How would you want inputs/outputs to work? |
Yeah, I still don't 100% understand how those ( |
@christopherthielen can I look into the code for the ui-router for Angular 2 work in progress somewhere? |
Unfortunately, there are a few blockers to checking in the ng2 code. I need to first split the 1.0 code into core code (in a separate repository) and ng1 code. I'd like ui-router 1.0.0-alpha.1 to be built/released off this split repository setup, then commit the initial ng2 repository. (See my checklist on #2223). I've updated the plunker a few times. It has working uiSref and uiView. If you really can't wait, you can check out the transpiled modules starting at line 3725 |
For those watching this issue: Initial ng2 support was released in alpha.3: https://github.com/angular-ui/ui-router/releases/tag/1.0.0-alpha.3 |
Just to make sure, the new router on Angular 1.4 (and I think it will be around for 2.x too, not sure) share some concepts from ui-router but from a different angle, will ui-router keep going as a parallel along with the almost-same-funcionality-besides-states with the new official router? Or plans to push a merge of concepts and technology to the official router?
The text was updated successfully, but these errors were encountered: