Closed dkostenko closed 8 years ago
There is a problem with router function canActivate. If a guard returns false, router doesn't change current URI, but the ng2-redux-router changes the state of Router
canActivate
false
Сode example below
Router with canActivate function:
const routes: RouterConfig = [ { path: 'list', component: ListPage, canActivate: [LoggedInGuard] }, ];
Guard with canActivate function implementation:
@Injectable() export class LoggedInGuard implements CanActivate { constructor() {} canActivate(): boolean { return false; } }
Thanks for the bug report. This issue should be fixed in 1.0.3, let me know if you're still having problems :)
There is a problem with router function
canActivate
. If a guard returnsfalse
, router doesn't change current URI, but the ng2-redux-router changes the state of RouterСode example below
Router with canActivate function:
Guard with canActivate function implementation: