What does it mean to make URL relative?

179 views Asked by At

My project is build using Angular and Springboot. In environemnt.prod.ts file I have backend url.

I am not sure what does it mean to make url ralative so that it should use same server url?

enviroment.prod.ts file

production:true,
url:'http://localhost:8080/api/amazon/steven'
1

There are 1 answers

0
Ashish Shah On BEST ANSWER

The relative URL does not use the full web address and only contains the location following the domain. It assumes that the link you add is on the same site and is part of the same root domain.

Update environment.prod.ts file

production:true,
url:'/api/amazon/steven'