Angularjs routeprovider vs stateprovider

What is the difference between angularjs $routeprovider and angularjs $stateprovider. I’ve seen both used and wondered which one to choose?

ie stateProvider

ie routeprovider

We started with $routeProvider and moved to $stateProvider to leverage some of the features that ui-router provides.

Warning: UI-Router is pre-beta and under active development. As such, while this library is well-tested, the API is subject to change. Using it in a project that requires guaranteed stability is not recommended.


* routeprovider is the default Angular router used with ngRoute
* stateProvider is used by ui-router which provides a different implementation of routeprovider


Sam is a passionate web developer from England. In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *