Closed noah2233 closed 5 years ago
Do you really think that posting the same question on multiple repositories (unrelated to your question btw) and ignoring the replies you get will magickly code for you?
In production mode I have the angular 5 client and the web api on the same site so I have no problem with the session but in development mode my angular 5 is hosted on localhost:4200 which reset the session on each call to a service. I can host the angular 5 and the web api on the same host on development mode but it means I have to do ng build all the time(which will have a big overhead). Any ideas? Should I use the session?
Hi, @noah2233, Open the Startup.cs and at the end of this file in code blick "if (env.IsDevelopment())" you can find this info: //spa.UseProxyToSpaDevelopmentServer("http://localhost:4200"); // Use this instead to use the angular cli server Unncoment this and change port to port which you need.
@Mynken approach should work fine for your situation. The angular part is made with angular cli. You can move it out of the project and threat it as you would any other angular cli project
In production mode I have the angular 5 client and the web api on the same site so I have no problem with the session but in development mode my angular 5 is hosted on localhost:4200 which reset the session on each call to a service. I can host the angular 5 and the web api on the same host on development mode but it means I have to do ng build all the time(which will have a big overhead). Any ideas? Should I use the session?