Deploying an Angular application
If you already have a web server that you want to use for your Angular application, you can copy the contents of the output folder to a path in that server. If you want to deploy it in another folder other than the root, you can change the href attribute of the <base> tag in the main HTML file in the following ways:
- Passing the
--base-hrefoption in theng buildcommand:ng build --base-href=/mypath/ - Setting the
baseHrefproperty in thebuildcommand of theangular.jsonconfiguration file:"options": { "outputPath": "dist/my-app", "index": "src/index.html", "browser": "src/main.ts", "baseHref": "/mypath/", "polyfills": [ "zone.js" ], "tsConfig": "tsconfig.app.json", "assets": [ { "glob": "**/*", "input"...