If you are using angular 19 I recomend you to take the query params with the input.require(). The name of the attribute must be equal to the name of the params in the url, and you can inject the service with the inject method instead of doing it in the constructor.