Is there a way for me to include a static html file using ng build? I would like to place it in a sub folder every time I build
e.g. MySite.com/static/index.html
I know I can do that manually, but would prefer to not do that for every build
According to the docs, you can do this in .angular-cli.json. Add an entry to the apps assets array, similar to the following:
{ "glob": "index.html", "output": "static" }
This assumes that index.html is in the src folder. You can also include an input property in the object if the source directory is different.
I came across this via a search for the same issue. The Angular documentation and file structure has changed a bit since previous posts.
Now configure it in angular.json and it is documented here:
https://angular.io/guide/workspace-config#assets-configuration