thisdot / open-source

Repository for open source packages
MIT License
34 stars 11 forks source link

Allow to use different properties with directive like `tdRouteTag` and `notInRouteTags$` pipe #46

Closed ktrz closed 2 years ago

ktrz commented 3 years ago

Is your feature request related to a problem? Please describe.

The tdRouteTag directive and notInTags$ pipe are hard coded to use a route data property called routeTags. Only the routeConfigService lets you access a different property name. I would be useful to have the possibility to use different property (configurable via another param)

Describe the solution you'd like

Possible API

propValue | notInRouteConfig:propName

*tdRouteConfigHas="propValue" [tdRouteConfigPropName]="propName"

example:

'settings' | notInRouteConfig:'myCustomTags'

*tdRouteConfigHas="'settings'" [tdRouteConfigPropName]="'myCustomTags'"

Describe alternatives you've considered

RouteConfigService allows for access to all custom properties. However, it would be better to have an easier way to access custom properties