[Updated focus question]. AngularDart perfectly supports the design of a modular application in many ways. Does this also apply to route design ? I.e.
Question: Can an application have more than one RouteInitializer ? For example, is the following possible:
class MyAppModule extends Module { MyAppModule() { ... type(RouteInitializer, // Currently implementedBy takes only one RouteInitializer? // Here we propose, eg, to allow a list. implementedBy: [MyAppRouteInitializerForFeatureSetA, MyAppRouteInitializerForFeatureSetB, MyAppRouteInitializerForFeatureSetC, ]); ... } }
Use case . I am considering that some of my students work on the same AngularDart project, but on (mostly) mutually exclusive sets of functions. Ideally, I would like them to work independently (as soon as top-level URL prefixes are matched). In this case, they will have their own RouteInitializer s. It would be nice to be able to simply "drop" projects in your subfolders, come time for integration, and not copy the routing insert into one class file.
[Original version of the question] (given that the interface name is RouteInitializer , and not possibly RouterInitializer ), it seems that more than one can be defined.)
- Does this also apply to route design ? I.e.,
- How many
Router instances can I associate with an Angular Dart application? (I suppose only one.) - Can an application have more than one
RouteInitializer ? (Given that the name of the RouteInitializer interface, and not possibly the RouterInitializer , it seems that more than one can be defined. - If more than one
RouteInitializer , then what is the scope of the addRoute name parameter?
Edit: Actually, the last question has its merits in the context of hierarchical routes, so I set it out here: angulardart-namespace-of-route-names-hierarchical-too .
source share