Reputation: 83
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?
Upvotes: 5
Views: 12620
Reputation: 493
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
Upvotes: 13
Reputation: 161
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
Upvotes: 2