-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Guards): Improve guards API based on common usage (#62)
Change guard factory from `createGuard` to `provideGuard` to clarify what the factory is doing. Re-order guard params to receive route params first. BREAKING CHANGE: Before: ```ts const auth = createGuard(function(http: Http) { return function(route: Route, params: any, isTerminal: boolean) { return http.get(...); }; }, [ Http ]); ``` After: ```ts const auth = provideGuard(function(http: Http) { return function(params: any, route: Route, isTerminal: boolean) { return http.get(...); }; }, [ Http ]); ```
- Loading branch information
1 parent
562c77b
commit 1ea2806
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters