Angularjs routeprovider vs stateprovider

Handsontable JavaScript Spreadsheet Most popular component for web apps

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 Deering

Sam Deering

Sam is a web developer, online entrepreneur and investor. In his spare time he enjoys coding, playing chess and sharing what he learns with others.

Leave a Reply

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