injectRouteData
Created by Krzysztof Kachniarz
injectRouteData
is a helper function that allows us to inject data from the current route as a signal.
Having route data as a signal helps in a modern angular signals based architecture.
Usage
injectRouteData
when is called, returns a signal with the current route data.
If we want to get the value for a specific key, we can pass the name of the object key to injectRouteData
.
Or, if we want to transform the data, we can pass a function to injectRouteData
.