Routing comes into play whenever you want to use a URL in your application.
In Client side Routing there are several way of achieving but the common one is:
In ngRoute - $routeProvider is used to construct the router but in UI-Router- $stateProvider is used to construct the router as UI-Router developed around the state which is opposed to ngRoute.