Daniel15 / RouteJs

JavaScript URL routing for ASP.NET MVC and WebForms
84 stars 19 forks source link

[FEATURE] Access current route data #36

Open JobaDiniz opened 10 years ago

JobaDiniz commented 10 years ago

It would be nice to get the current route data, as you normally would in Views:

Url.RequestContext.RouteData.Values["action"]

Daniel15 commented 9 years ago

Interesting idea. RouteJs is fairly static at the moment though, and this would require data to be loaded for every page separately. It's an interesting idea but I'm not sure what the implementation would look like at the moment.

ExigoOffice commented 9 years ago

I can imagine the API looking something like Router.values["KEY"]. If I find a free moment, I wouldn't mind forking and giving it a shot myself.