Closed brunoneve closed 8 years ago
Hi Guys,
in the readme has example to protect a route, I tried and not funcinou, so I made some changes and is now working.
will example if someone needs, using $ routeChangeError
$rootScope.$on('$routeChangeError', function(event, current, previous, rejection){ console.log(rejection); if(rejection === 'Unauthorized'){ $location.path('home'); } });
Att.
Thanks. I've updated the README example, adding the event param as the first param in the $routeChangeError callback function.
event
$routeChangeError
Hi Guys,
in the readme has example to protect a route, I tried and not funcinou, so I made some changes and is now working.
will example if someone needs, using $ routeChangeError
Att.