framework/js/lib/utils/map-routes.js
Toby Zerner ffc2863f70 Extensibility: discussion list params
Also give the root controller the name of the current route so they can
easily route back to it
2015-05-02 08:43:38 +09:30

9 lines
182 B
JavaScript

export default function mapRoutes(routes) {
var map = {};
for (var r in routes) {
routes[r][1].props.routeName = r;
map[routes[r][0]] = routes[r][1];
}
return map;
}