Currently, I am tasked with enhancing an existing AngularJS application by enabling the passing of an additional parameter to any route within the application (specifically, an email tracking ID).
I am exploring the possibility of utilizing a querystring parameter without disrupting the current routing setup. My goal is to implement code that can identify and handle the querystring parameter, perhaps through some sort of global navigation listener.
As someone who is not extensively experienced with angular development, I am unsure whether I need to make modifications to the routing mechanics or alter controller scripts. Is there a way for me to create a universal service that can parse the querystring parameter regardless of the specific route?
While I understand that I could develop a service using $location
to access the querystring parameter, I am concerned about having to inject this service into multiple controllers, feeling that it might lead to redundancy in the codebase.