In order to see the ng build
result, I need to run ng serve
, but how that helps me to create an angular2 project that I can run in any web hosting? my web hosting don't know angular2 or ng serve
command. What did I miss in this process?
Please advise how after using angular-cli (which is a great tool) I'm now ready to updload files to any web hosting and see my app running. I thought if I run the "index.html" file I get app that runs and not depeneding on any commands :-/
This is the resuilt of index.html:
ng serve : in memory (local) development ng build : creates a distributable stand-alone app in your dist folder.
So run a ng build and copy the contents of the dist folder to any remote server and it should run (need to run it in the root btw, if you want to run your app in a subfolder on your remote server, do a ng build --base-href myapp --prod)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With