Wednesday, October 12, 2016

AngularJS - "ngRoute vs ui-router"

The ngRoute as well as ui-router, both are used for defining routing in an application. Following are the differences between them:
  • The ngRoute module is created by the AngularJS team, while the ui-router is the third party module.
  • The ng-route implements the routing based on the url, while the ui-router implements the routing based on the state of the application.
  • The ui-router provides everything that the ngRouter module provides along with additional features.
    • Nested states & views
    • Multiple named views
For more details on to routing please refer ngRoute API reference and ui-router wiki.

No comments:

Post a Comment