Angular JS provides a nice routing functionality via $routeProvider. The ngRoute module helps your application to become a Single Page Application. If you want to navigate to different pages in your application, but you also want the application to be a SPA (Single Page Application), with no page reloading, you can use the ngRoute module. The ngRoute module routes your application to different pages without reloading the entire application. The HTML is rendered in <div ng-view></div> 

The issue with route provider is that, we can have only one ng-view.  If our SPA has multiple small components on the page that we wanted to render based on some conditions, $routeProvider fails. To achieve that, we need to use directives like ng-include, ng-switch, ng-if, ng-show, which looks bad to have them in SPA. We can not relate between two routes like parent and child relationship. We can not show and hide a part of the view based on url pattern.

 AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached.