When a transition fails (either in a canActivate, canDeactivate or middleware function), a custom error can be returned containing a redirect property.
Persistent parameters plugin now available.
Breaking change
There are no breaking changes.
Code example
Redirecting to a login page if the current user is not logged in: