Aurelia Route attributes


#1

Hi,
Is there a way for making Aurelia router more automatic?
By automatic I mean, I don’t want to add routes to the routeConfiguration manually each time I add new view/viewmodel. Maybe some convention?
Or can it be built something like Asp.NET Route attribute that I could apply to my viewmodel or as attribute in view then at startup the routing engine would look for those attributes and build the route configuration automatically?

ie.

@route("my-view-model")
export class MyViewModel
{
...
}

#2

There is plan to implement exact that in vNext. https://github.com/aurelia/aurelia/issues/164

For current Aurelia, this one is similar, but not exact dynamic. https://github.com/aurelia-contrib/aurelia-router-metadata


#3

Nice, can’t wait for it :slight_smile:
thanks