Created
September 27, 2019 13:10
-
-
Save sergeysova/2e367b6315b2059571cde1782125dd42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const routes = [ | |
| { | |
| name: "auth.login", | |
| path: "/login", | |
| component: LoginPage, | |
| guards: [checkAuthn({ auth: false, redirectTo: "home" })], | |
| }, | |
| { | |
| name: "transactions.list", | |
| path: "/transactions", | |
| component: TransactionsPage, | |
| guargs: [ | |
| checkAuthn({ auth: true, redirectTo: "auth.login", method: "replace" }), | |
| checkRoles(["admin", "user"]), | |
| ], | |
| children: [ | |
| { | |
| name: 'transactions.foo', | |
| path: '/foo', | |
| component: DemoPage, | |
| // guards from parents applies | |
| }, | |
| ] | |
| }, | |
| ]; |
Author
sergeysova
commented
Sep 27, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment