Difference between angular-route and angular-ui-router
转摘:http://stackoverflow.com/questions/21023763/difference-between-angular-route-and-angular-ui-router
Difference between angular-route and angular-ui-router
|
I am new to AngularJS. I find Angular quite interesting and planning to use angular in my big apps. So I am in the process to find out the right modules to use. What is the difference between ngRoute (angular-route.js) and ui-router (angular-ui-router.js)modules? In many articles when ngRoute is used, route is configured with $routeProvider. However, when used with ui-router, route is configured with $stateProvider and $urlRouterProvider. This creates a bit of confusion for me. Which module should I use for better manageability and extensibility? Your answers are greatly appreciated. |
|||||
|
|
ui-router is a 3rd-party module and is very powerful. It supports everything the normal ngRoute can do as well as many extra functions. Here are some common reason ui-router is chosen over ngRoute:
In essence, ui-router is ngRouter with more features, under the sheets it is quite different. These additional features are very useful for larger applications. More Information:
|
|||||
|


浙公网安备 33010602011771号