Skip to content

Instantly share code, notes, and snippets.

@kadzany
Last active May 3, 2018 06:42
Show Gist options
  • Save kadzany/878aa3da4546eb1c8530c78d88483a03 to your computer and use it in GitHub Desktop.
Save kadzany/878aa3da4546eb1c8530c78d88483a03 to your computer and use it in GitHub Desktop.
Json for routing data - example for admin user role
{
"roles": ["admin", "outClerk", "inClerk", "whManager"],
"routes": [
{
"path": "roles",
"component": "RoleComponent"
},
{
"path": "roles/add",
"component": "EditRoleComponent"
},
{
"path": "roles/:id",
"component": "EditRoleComponent"
}
]
}
@tuicode
Copy link

tuicode commented May 2, 2018

{
path: 'roles',
data: { roles: ['admin', 'editor'] },
component: "RoleComponent"
}, {
path: 'roles/add',
data: { roles: ['admin', 'editor'] },
component: "EditRoleComponent"
},
{
path: 'roles/:id',
data: { roles: ['admin'] },
component: "EditRoleComponent"
},

@kadzany
Copy link
Author

kadzany commented May 2, 2018

yup, the file is updated to have multiple roles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment