Valid data in $ionicViewBeforeEnter and if not valid go back

Hi, it’s possible to valid data from provider in controller in $ionicViewBeforeEnter event and if this data is’t valid go back or cancel load this controller ?!

I guess you can do this over resolve in $state.
And the use on $stateChangeError and other events…