r/angularjs • u/ctanga • Nov 14 '14
[Code] UI-Router 0.2.12 released
https://github.com/angular-ui/ui-router/releases/tag/0.2.125
Nov 14 '14
ui router is brilliant, thanks for all the hard work!
I don't know how anyone can build an angular app without it.
6
u/filifjonk Nov 14 '14
Why not just use angular-route.js?
9
Nov 14 '14
They explain it:
"Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached."
They offer something different. They're not claiming ui-router is better than ngRoute.
8
u/e82 Nov 14 '14
IMO, "why wouldn't you use ui-router" -- I don't think I'd consider starting a new angular project and using angular-router over ui-router.
Nested states, named views, etc - makes building out anything non-trivial much easier.
4
u/zomgwtfbbq Nov 14 '14
Yes, yes, downvote someone asking a reasonable question that obviously isn't already familiar with ui-router. Wtf is wrong with this sub? Kudos to the people that took the time to reply and explain the difference between the two.
1
12
u/ctanga Nov 14 '14
This release fixes known issues with angular 1.3. It is also the first release where Typed and optional params with default values should be fully functional. See the changelog for more.
Params with default values may be squashed in the url. This plunkr demonstrates the different settings:
http://run.plnkr.co/plunks/VMPc8D7oUG0B1R3QuiCE/#/user/christopherthielen/gallery/favorites/photo/TjjgkZW
I updated the docs for $stateProvider.state, which can be seen here:
http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$stateProvider