Publish Angular application to an IIS web application

 We have a .NET core app with an angular project located at http://domain.com/webapp

Then we have to build the angular project like this:

ng build --base-href=/webapp/ --deploy-url=/webapp/

The --base-href is for the <base href="/webapp/"/> it must be set or else all API calls will be directed to the /

The --deploy-href is for the internal angular references, such as loading data from the assets folder.


Post a Comment

Previous Post Next Post