Add "variables" for path parameters
zth opened this issue · 0 comments
zth commented
Allow using "variables" for path parameter enums, like:
// Now
"/some/path/:status(online|offline|idle)"
// With variables
"/some/path/:status{onlineStatus}"
// In the config, or wherever makes sense
{
routeVariables: {
onlineStatus: ["online", "offline", "idle"]
}
}
Means easier reuse, easier to keep in sync since you can setup the JS like you want, etc.