angularjs - 将 Ionic 部署为网站

标签 angularjs ionic-framework ionic

我创建了一个 ionic 应用程序并希望将其部署为网站。在自定义域上部署它的最佳方式是什么?我正在考虑使用 azure web 应用程序来托管 ionic 应用程序。所有文档都将其用作 IOS 和 Android 的混合应用程序。但在这一点上,我们只对它作为一个网站感兴趣。

最佳答案

这是一个迟到的答案,但作为 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!





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!



来源:https://github.com/ionic-team/ionic/issues/7376

根据我在 Ionic 1 中的经验,在网站上工作很简单,只需复制/粘贴 www目录,实际上,它确实有意义,您正在运行 AngularJS 网站!您可能会遇到一些错误并且某些功能无法正常工作(我的意思是 native 插件,例如 facebookConnect),但您可以处理它并运行特定于 Web 的版本。

在我们公司,我们确实有一个应用程序作为带有firebase的网站和具有相同代码的移动应用程序工作,但您确实需要编写几行代码来处理网页浏览端或移动原生调用。

关于angularjs - 将 Ionic 部署为网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33195748/

相关文章:

javascript - ng-repeat orderBy 位置不起作用

css - 将卡片展开整个宽度

angular - 如何更改 Ionic 4 的 ionic 范围引脚字体和格式?

angularjs - 如何在历史中缓存状态(页面)回到 Angular JS 中,如 IONIC

ionic-framework - 如何在 Ionic 应用程序的单个 View 中的 subview 之间切换?

javascript - 将模型绑定(bind)到选定的值,而不是在项目上选择设置

javascript - 使用带有静态文件而不是服务器的 Karma 进行 AngularJS 端到端测试

javascript - jQuery、Asp.net -jAutoCalc : Implement auto calculation on the form to be appended in the table using jQuery

javascript - 测试在不调用 $rootScope.$apply() 的情况下返回 promise 的 AngularJS 服务?

javascript - ionic 应用程序不会连接到 Socket.IO