I am started with AngularJS 2:
All works!
However how to run it in production on shared hosting (without Node ant not on vps)? How to open in browser by clicking on index.html?
You have to command ng build --prod
.
This will build your app into the dist folder.
Copy the contents of your dist folder to the public directory of your shared hosting.
Answered here: https://stackoverflow.com/a/40854458/2816279
You dont need anything else other than importing a few javascript files in your index.html file.
Check this live example
Download it from plunkr here and extract it to your required folder in your shared hosting, that's all.
Source: https://angular.io/docs/js/latest/quickstart.html
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