Can someone explain what happened to
<div ng-if="somestate" ng-include="someview"></div>
It does not handle URLs in any way. You want the URL to change when you switch to a different state, and you want the state to change when the URL changes. You want you to be able to add bookmarks to the application or send the URL by e-mail and return to this page rather than the home page when you open the bookmark or link.
It also does not allow data resolution before switching to state. Both ui-router and ngRoute allow this: the state changes only when the data necessary to display this state has been successfully loaded.
This is the main task of ui-router and ngRoute. ui-router has many other useful properties, such as events when a state changes, view name, state inheritance (it is very useful to process a view consisting of several tabs, for example), etc.
source share