-
-
Save kaufd/ad49e6bcb52e6542112f93cebda9441e 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 | |
| }, | |
| ] | |
| }, | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment