I am trying to redirect inside a ui-router resolve and wanted to know if there is a way to reroute in a router resolver. Currently this does not work as one would think.
I use this
function Check($state, $q) { var deferred = $q.defer(); if (condition) { deferred.resolve(); } else { deferred.reject(); } return deferred.promise.catch(function () { $state.go('path'); }); }