Skip to content
This repository was archived by the owner on Jul 27, 2018. It is now read-only.
This repository was archived by the owner on Jul 27, 2018. It is now read-only.

Dispatch go not working in canActivate if dispatch event in ngOnInit #54

@antonbarada

Description

@antonbarada

Repo for reproduce:
https://github.com/thebarada/ngrx-router-can-activate-bug
Just try go to /profile - path will be empty
Then comment dispatch on ngOnInit in AppComponent and try one more time - path will be '/login' and it is correct

Description:
I create canActivate guard where redirect to login if user non-authorized
Also on init AppComponent I dispatch event for load some data

I suppose this two actions disturb each other and go action not working

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions