How to deploy Ionic as a website?

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

As you may know, I’m really into Ionic framework lately and am helping out on StackOverflow with the knowledge I gained so far with the framework. I’m in the top All time answerers list.

edit: As of version 1.2 Ionic is officially saying that you are free to deploy Ionic as a website.

I answered this question by user Ayush Chordia:

I have created an ionic app and want to deploy it as a website. What’s the best way to deploy it on a custom domain ? I was thinking of using azure web app to host the ionic app. All the documentation refers to use it as hybrid app for IOS and Android. But at this point we are only interested for it to function as a website.

In my answer I disagreed with this one:

As I stated in the comment to the only provided answer – I disagree.

If you’re not using any Cordova plugins then there is no problem (if you really wish to) to upload the contents of the www folder to your server, and woila – you’ll have the same app.

However, it is important to note that Ionic never intended for such a use, and the users of your “website” will have to have a newest browser in order to see the “website” correctly (not broken down due to some feature that Ionic is using in either CSS or HTML that some older browsers do not support).

You can see such example here: http://nikola-dev.com/IonicCalculator/mobile.html, and you can take a look at the tutorial with step by step on how to recreate the application. I literally took out the contents of the www folder and put it on the web server, and as you can see it works.

https://twitter.com/HitmanHR/status/674121400911863808

Written by Nikola Brežnjak