I am working on an Angular application and I am looking to retrieve the full URL of the application from within the code - specifically, the complete address that the user entered into their browser to access the app.
When using Router or ActivatedRoute in my code, I have only been able to extract the path portion of the URL, without the entire URL itself.
constructor (private rt : Router)
{
}
ngOnInit ()
{
console.log (this.rt.url);
}
For example, if my app is located at https://localhost/blabla, I not only need /blabla but also the complete URL string.