Deploy Ionic as a website

前端 未结 4 1655
眼角桃花
眼角桃花 2020-12-29 06:23

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

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 06:49

    It is a late answer, but as an official for Ionic 2:

    With Ionic 2 we are fully supporting the web (including eventual built in support for Progressive web apps) as a platform right alongside Android, IOS, Windows 10 and Electron. Thanks for using Ionic!

    And

    If you are using certain Cordova plugins that only work on native platforms then these will not work on the web, although if you are using Ionic native they will fail gracefully. But if you stay away from using those certain plugins, or write logic to provide an alternative when on the web then it should work perfectly. Also, our browser support includes Chrome, Safari, Firefox, Opera(since it's just chrome nowadays), and Edge. We do not support any version of Internet Explorer with Ionic 2. So basically, as long as you keep Cordova plugins in mind, the same Ionic 2 project that works on your Android, IOS or Windows 10 device will work just as well in the browser. Thanks!

    The source for this: https://github.com/ionic-team/ionic/issues/7376


    From my experience in Ionic 1, it is simple to work on a website, it is just copy/paste for www directory, actually, it does make sense, you are running AngularJS website! you could have a few errors and some of the functionalities not working (i mean the native plugins as for example facebookConnect) but you can handle it and run the web-specific version instead.

    In our company, we do have an application work as a website with firebase, and mobile app with the same code, but you do need to write a few lines to handle web browsing side or mobile native call.

提交回复
热议问题