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

Angular 1.4 router and ui-router future #1759

Closed
pocesar opened this Issue Feb 18, 2015 · 31 comments

Comments

Projects
None yet
@pocesar

pocesar commented Feb 18, 2015

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?

@akholodenko

This comment has been minimized.

Show comment
Hide comment
@akholodenko

akholodenko Feb 24, 2015

And to add on, will Angular 1.4 have any breaking updates to the current stable build of UI Router?

akholodenko commented Feb 24, 2015

And to add on, will Angular 1.4 have any breaking updates to the current stable build of UI Router?

@btford

This comment has been minimized.

Show comment
Hide comment
@btford

btford Feb 25, 2015

I think it will be around for 2.x too

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. :)

btford commented Feb 25, 2015

I think it will be around for 2.x too

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. :)

@gmoothart

This comment has been minimized.

Show comment
Hide comment
@gmoothart

gmoothart Mar 5, 2015

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.

gmoothart commented Mar 5, 2015

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.

@amcdnl

This comment has been minimized.

Show comment
Hide comment
@amcdnl

amcdnl Mar 6, 2015

Collaborator

@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.

Collaborator

amcdnl commented Mar 6, 2015

@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.

@nateabele

This comment has been minimized.

Show comment
Hide comment
@nateabele

nateabele Mar 6, 2015

Member

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.

Member

nateabele commented Mar 6, 2015

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.

@joshikeerti

This comment has been minimized.

Show comment
Hide comment
@joshikeerti

joshikeerti Mar 6, 2015

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.
Initially we started using ui-router because it handled a lot of the cases the default router did not handle. Will the new router be comparable to the ui-router in terms of features going forward?

joshikeerti commented Mar 6, 2015

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.
Initially we started using ui-router because it handled a lot of the cases the default router did not handle. Will the new router be comparable to the ui-router in terms of features going forward?

@amcdnl

This comment has been minimized.

Show comment
Hide comment
@amcdnl

amcdnl Mar 6, 2015

Collaborator

@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.

Collaborator

amcdnl commented Mar 6, 2015

@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.

@nateabele

This comment has been minimized.

Show comment
Hide comment
@nateabele

nateabele Mar 6, 2015

Member

@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.

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.

Yes. More on that soon.

Member

nateabele commented Mar 6, 2015

@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.

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.

Yes. More on that soon.

@futurechan

This comment has been minimized.

Show comment
Hide comment
@futurechan

futurechan commented Mar 15, 2015

👍

@demisx

This comment has been minimized.

Show comment
Hide comment
@demisx

demisx Apr 14, 2015

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.

demisx commented Apr 14, 2015

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.

@georgebarbarosie

This comment has been minimized.

Show comment
Hide comment
@georgebarbarosie

georgebarbarosie Apr 21, 2015

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?

georgebarbarosie commented Apr 21, 2015

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?

@evillemez

This comment has been minimized.

Show comment
Hide comment
@evillemez

evillemez Jun 14, 2015

I made a similar comment in an angular/router issue, but maybe it's best made here. One of the key features for our team is routing that is independent of browser urls. We have a large-ish app that runs in a browser, or desktop client, and does not use URLs for routing anywhere. We used ui-router primarily for this reason. It's a realtime websocket app, and every new connection goes through several auth and security procedures before anything of interest is shown. Once they're past that, the app restores the user to their previous state, which we store server side.

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:

angular/router#121

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?

evillemez commented Jun 14, 2015

I made a similar comment in an angular/router issue, but maybe it's best made here. One of the key features for our team is routing that is independent of browser urls. We have a large-ish app that runs in a browser, or desktop client, and does not use URLs for routing anywhere. We used ui-router primarily for this reason. It's a realtime websocket app, and every new connection goes through several auth and security procedures before anything of interest is shown. Once they're past that, the app restores the user to their previous state, which we store server side.

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:

angular/router#121

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?

@nateabele nateabele self-assigned this Jun 14, 2015

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen

christopherthielen Jun 14, 2015

Contributor

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.

Contributor

christopherthielen commented Jun 14, 2015

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.

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen
Contributor

christopherthielen commented Jun 26, 2015

UI-Router 1.0 preview is available: https://github.com/angular-ui/ui-router/tree/feature-1.0

@amcdnl

This comment has been minimized.

Show comment
Hide comment
@amcdnl

amcdnl Jun 26, 2015

Collaborator

@christopherthielen I'd love to see future-state integration out of the box. ;)

Collaborator

amcdnl commented Jun 26, 2015

@christopherthielen I'd love to see future-state integration out of the box. ;)

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen
Contributor

christopherthielen commented Jun 26, 2015

@amcdnl me too!

@balteo

This comment has been minimized.

Show comment
Hide comment
@balteo

balteo Aug 6, 2015

Hi all,
Any planned release date for UI router 1.0?
Regards,

balteo commented Aug 6, 2015

Hi all,
Any planned release date for UI router 1.0?
Regards,

@fxck

This comment has been minimized.

Show comment
Hide comment
@fxck

fxck Aug 12, 2015

Can I read more about the 1.0 somewhere? Or that readme is all there is?

cc @nateabele @christopherthielen

fxck commented Aug 12, 2015

Can I read more about the 1.0 somewhere? Or that readme is all there is?

cc @nateabele @christopherthielen

@nateabele

This comment has been minimized.

Show comment
Hide comment
Member

nateabele commented Aug 12, 2015

@bopm

This comment has been minimized.

Show comment
Hide comment
@bopm

bopm Dec 16, 2015

Ok, Angular 2 beta is here. What's new about ui-router usage with ui-router?

bopm commented Dec 16, 2015

Ok, Angular 2 beta is here. What's new about ui-router usage with ui-router?

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen

christopherthielen Jan 12, 2016

Contributor

I've begun work on UI-Router 1.0 + ng2

http://plnkr.co/edit/PF69BVa1WnUYZKkURgMm

Contributor

christopherthielen commented Jan 12, 2016

I've begun work on UI-Router 1.0 + ng2

http://plnkr.co/edit/PF69BVa1WnUYZKkURgMm

@bopm

This comment has been minimized.

Show comment
Hide comment
@bopm

bopm commented Jan 12, 2016

👍

@demisx

This comment has been minimized.

Show comment
Hide comment
@demisx

demisx Jan 12, 2016

👍 Yea-a-a-a-h!!!

demisx commented Jan 12, 2016

👍 Yea-a-a-a-h!!!

@asaarnak

This comment has been minimized.

Show comment
Hide comment
@asaarnak

asaarnak Jan 12, 2016

Great, ui-router rocks! I hope to use future states.

asaarnak commented Jan 12, 2016

Great, ui-router rocks! I hope to use future states.

@Namek

This comment has been minimized.

Show comment
Hide comment
@Namek

Namek Feb 3, 2016

@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.

Namek commented Feb 3, 2016

@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.

@evillemez

This comment has been minimized.

Show comment
Hide comment
@evillemez

evillemez Feb 3, 2016

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.

evillemez commented Feb 3, 2016

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.

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen

christopherthielen Feb 3, 2016

Contributor

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?

Contributor

christopherthielen commented Feb 3, 2016

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?

@nateabele

This comment has been minimized.

Show comment
Hide comment
@nateabele

nateabele Feb 3, 2016

Member

Yeah, I still don't 100% understand how those (@Input and @Output, specifically) would apply, but yes, we're definitely committed to UI Router's current goals of enabling declarative, high-level design.

Member

nateabele commented Feb 3, 2016

Yeah, I still don't 100% understand how those (@Input and @Output, specifically) would apply, but yes, we're definitely committed to UI Router's current goals of enabling declarative, high-level design.

@cburgdorf

This comment has been minimized.

Show comment
Hide comment
@cburgdorf

cburgdorf Feb 4, 2016

@christopherthielen can I look into the code for the ui-router for Angular 2 work in progress somewhere?

cburgdorf commented Feb 4, 2016

@christopherthielen can I look into the code for the ui-router for Angular 2 work in progress somewhere?

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen

christopherthielen Feb 4, 2016

Contributor

@cburgdorf

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

Contributor

christopherthielen commented Feb 4, 2016

@cburgdorf

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

@christopherthielen

This comment has been minimized.

Show comment
Hide comment
@christopherthielen

christopherthielen Apr 11, 2016

Contributor

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

Contributor

christopherthielen commented Apr 11, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment