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