Skip to content

Commit

Permalink
docs(RouterStore): Fix type signature of ROUTER_NAVIGATION action (ng…
Browse files Browse the repository at this point in the history
  • Loading branch information
dherges authored and brandonroberts committed Sep 5, 2017
1 parent 2f6a035 commit 28e1983
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions docs/router-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,23 @@ Install @ngrx/router-store from npm:

## Usage

During the navigation, before any guards or resolvers run, the router will dispatch a ROUTER_NAVIGATION action, which has the following signature:
During the navigation, before any guards or resolvers run, the router will dispatch a `ROUTER_NAVIGATION` action, which has the signature `RouterNavigationAction`:

```ts
export type RouterNavigationPayload<T> = {
routerState: T,
event: RoutesRecognized
}
/**
* Payload of ROUTER_NAVIGATION.
*/
export declare type RouterNavigationPayload<T> = {
routerState: T;
event: RoutesRecognized;
};
/**
* An action dispatched when the router navigates.
*/
export declare type RouterNavigationAction<T = RouterStateSnapshot> = {
type: typeof ROUTER_NAVIGATION;
payload: RouterNavigationPayload<T>;
};
```

- Reducers receive this action. Throwing an error in the reducer cancels navigation.
Expand Down

0 comments on commit 28e1983

Please sign in to comment.