Routing is just another way of fixing some content dynamically as part of your application.It is a key part of all websites and web applications in one way or another.
It plays a central role in static HTML pages as well as in the most complex React web applications. 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:
Both the router provides the routing concept but most of the developer using the UI-Router because of the having more flexibility and provide more feature and capability than ngRoute.
- UI-Route is build by Angular team.
- It fully replace ngRoute and is more powerful than ngRoute
- It is developed around the state which is opposed to ngRoute.
So now, the question arise what is state in UI-Router.
It is bit more than route. A more comprehensive navigation criteria that holds the route related information and its behaviors.
In Short we can say that UI-Route describes how the UI looks like when navigation occur or when a route is triggered or when we switched to different route.