I have a ASP.NET solution with both a web project that hosts my angular2 app and a web api project.
Both projects are setup as startup projects and are running on different ports (
45365 for the web project and
20234 for the web api project).
Let´s say I have a web api controller that exposes
/api/values which is currently accessible via
How can I access this in my angular2 web app? If I try
it tries to access
http://localhost:45365/api/values which is not desired. However, I want it to call
http://localhost:20234/api/values without specifying the whole url including domain to make my service work even when the app is published to a public server with an other domain than
How do I tell
20234 as port number?