This would simplify the example with a title we have. However, we might need a way to add a default value somehow (in case eg. title is we want a default title everywhere apart from some specific routes). I think we can provide it either via an injection token (eg. TD_ROUTE_CONFIG_DEFAULT_VALUE) or via a second property for this directive
Is your feature request related to a problem? Please describe.
It would be great to be able to access route's data directly from a template using a structural directive.
Describe the solution you'd like
We could create a
tsRouteConfig
structural directive to expose the route's data in the templateThis would simplify the example with a title we have. However, we might need a way to add a default value somehow (in case eg. title is we want a default title everywhere apart from some specific routes). I think we can provide it either via an injection token (eg.
TD_ROUTE_CONFIG_DEFAULT_VALUE
) or via a second property for this directiveAnd the property would take precedence over the injection token value.