Errors and redirections
Custom errors
A string
router.canActivate('profile', (router) => (toState, fromState, done) => {
done('my custom error');
});
router.navigate('profile', (err, state) => {
/* Error:
{
code: 'CANNOT_ACTIVATE',
segment: 'profile',
error: 'my custom error'
}
/*
})An object
Redirecting after an error
Last updated