将 Ionic 部署为网站 [英] Deploy Ionic as a website

查看:40
本文介绍了将 Ionic 部署为网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

推荐答案

Ionic 1.2 正式 支持部署为网站

edit: Ionic 1.2 officially supports deployment as a website!

正如我在对唯一提供的答案的评论中所述 - 我不同意.

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

如果您没有使用任何 Cordova 插件,那么将 www 文件夹的内容上传到您的服务器没有问题(如果您真的希望),那么 woila - 您将拥有同一个应用.

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.

但是,重要的是要注意 Ionic 从未打算用于此类用途,并且您网站"的用户必须拥有最新的浏览器才能正确查看网站"(不会因某些原因而崩溃)Ionic 在 CSS 或 HTML 中使用的一些旧浏览器不支持的功能).

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).

你可以看看教程 一步一步介绍如何重新创建应用程序.我从字面上取出 www 文件夹的内容并将其放在 Web 服务器上,正如您所看到的那样.

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.

这篇关于将 Ionic 部署为网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆