Open vincentwinkel opened 8 years ago
Update: according to this doc: https://angular.io/docs/js/latest/api/router/RouteRegistry-class.html
It's seems possible to directly use this.registry.config(component, route)
and this.registry.configFromComponent(component)
instead of this.updateRouteConfig(component, ...)
and this.getRoutes()
.
This solution allows this module to work with Angular Universal
.
@vincentwinkel worry for the late response. I'd appreciate a PR with the suggested change.
Hi, Thanks for your project. I'm learning Angular2 so maybe I'm wrong, but I think there is an error here (AppCmp.getAppRoutes(), in app.ts line 91)
return { path: [
/${route.as}], name: route.as };
should bereturn { path: [
${route.path}], name: route.as };
Moreover, can you show an example including 2 components sharing your routerConfigurator service in separate files ? I try to do that, but when I add routes in my child component, I've an error (I can describe but it's not the goal of Issues :) ...) Thanks !