George Roubie
1 min readJun 15, 2020

--

Hello and thank you for reading. In this example, I am using a Constants file instead of the environment.ts because it's easier to understand for someone new. Yes, you should always use the .environement.ts. Also, I prefer to create and encode the url and the params by my self because I do not want my code to depend so much on the HttpClient module, in order to be safe for a future Angular update. Finally, the Core Module instead of the providedInRoot is common for the Angular 7 and in my opinion better because you have all the reusable services in one place.

--

--

George Roubie
George Roubie

Written by George Roubie

Experienced Software Engineer with more than 10 years of experience, specialized in Front-End Web technologies, with strong foundations in programming.

Responses (1)