First step:
First run the command in ng-cli
ng build
or
ng build -prod (then it will compact all files for production version)
Second step:
Edit in index.html in dist directory
<base href="/"> to <base href="./">
Third step:
Put all the files on the server (maybe htdocs on the local host or on any server)
Hope this works.
source share