I am started with AngularJS 2:
- Instaled NodeJS
- Downloaded start project
- Run on Node
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?
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.