How to use / dist folder files created by angular-cli ng build to create an application that you can run yourself?

To see the result ng build, I need to run ng serve, but how does this help me create an angular2 project that I can run on any web hosting? my web hosting does not know the angular2 command or ng serve. What did I miss in this process?

Please advise how after using angular-cli (which is a great tool) I am now ready to upload files to any web hosting and see how the application works. I thought that if I ran the index.html file , I get an application that starts and does not depend on any commands: - /

This is resuilt index.html: enter image description here

+4
2

ng : () ng build: dist.

, ng build dist , ( , , a ng build --base-href myapp --prod)

+8

dist

ng build --base-href .

"." .

+1

Source: https://habr.com/ru/post/1670301/


All Articles