Navigation system


#1

Hi all,

can we use navigation system without router?
Are there any pros/cons using one beside another.

Thanks.


#2

Short answer: Not really, and you wouldn’t want to

UI-router is a much more powerful routing system than say, angular’s ng-router, which we switched from way back in 0.9.19.

The pros of using UI-router is that it lets devs create multiple nested routes that ng-router jsut can’t do.

We made the decision to quickly switch off of ngRoute before we hit the beta which didn’t have the ability to let users build things like nested navigation that mobile developers can easily do on iOS, etc. That means you can have one tab of a tabbed interface with its own navigation stack. ngRoute can’t handle that.

We don’t look at the angular modules and our directives as being comprehensive maps to the ng modules. Rather, we pick the best ones, and build our custom directives to make the best possible mobile app development library.

We just decided ngRoute wasn’t enough for what we needed. Fortunately, moving to ui-router is actually fairly straightforward, take a look at the seed proejct’s new routes, you can usually just change $routeProvider to $stateProvider and use state() instead of when()