I'm trying to set up a SPA, that when entering the application, the first thing it has to do is open to an external url, for OAUTH2 validation.
It is a url opening with parameters.
In all the information I see it redirects it with
window.location.href = 'https://web.com';
Isn't there a more "elegant" way to do it with Typescript or Angular itself? especially for the issue of passing parameters.
When it comes to parameter handling, you can use the URL API and URLSearchParams to generate or process a URL:
Once generated with the parameters you need, you can assign it directly.