Asp.net Core Angular 5 Template (Angular-Cli Support for base-href and deploy-url) #127

Closed
opened 2025-08-09 17:15:06 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @justin-ruffin on 3/15/2018

When creating an SPA application that needs to deployed to a location other than /index.html, such as /myapp/index.html, we can set the "deployUrl : myapp" in the ".angular-cli.json" config file.

While this works for deployment of the application it does not appear to work during development using "Microsoft.AspNetCore.Builder.UseProxyToSpaDevelopmentServer". The following settings were tested with no success:

spa.UseProxyToSpaDevelopmentServer("http://localhost:4200/");

spa.UseProxyToSpaDevelopmentServer("http://localhost:4200/myapp");

The package.json "npm run script" was modified as follows:

start": "ng serve --base-href app --deploy-url app --extract-css

I have reviewed the documentation and can cannot find guidance or an indication that the new angular template will support this scenario.

We currently have this support in the previous template utilizing Webpack and HMR.

*Originally created by @justin-ruffin on 3/15/2018* When creating an SPA application that needs to deployed to a location other than /index.html, such as /myapp/index.html, we can set the "deployUrl : myapp" in the ".angular-cli.json" config file. While this works for deployment of the application it does not appear to work during development using "Microsoft.AspNetCore.Builder.UseProxyToSpaDevelopmentServer". The following settings were tested with no success: > spa.UseProxyToSpaDevelopmentServer("http://localhost:4200/"); > spa.UseProxyToSpaDevelopmentServer("http://localhost:4200/myapp"); The package.json "npm run script" was modified as follows: > start": "ng serve --base-href app --deploy-url app --extract-css I have reviewed the documentation and can cannot find guidance or an indication that the new angular template will support this scenario. We currently have this support in the previous template utilizing Webpack and HMR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#127
No description provided.