我需要采取哪些步骤才能在 trigger.io 中使用 Ionic 框架? [英] What steps do I need to take to use the Ionic Framework with trigger.io?
问题描述
我搜索了一些关于如何将 Ionic Framework 与 trigger.io 集成的文档,但没有成功,但我没有看到任何文档.
I unsuccessfully searched for some documentation of how to integrate the Ionic Framework with trigger.io, but I don't see any.
如果有人知道或有一些,我很乐意见到他们.如果没有,我会冒险向前并在这里发布我的步骤:)
If anyone knows or has some, I'd love to see them. If not, I'll venture forward and post my steps here :)
推荐答案
包括 Ionic 框架
Ionic Framework 提供了您可以包含在 HTML 中的 CSS 和 JavaScript 库.有两种方法可以在 trigger.io 应用程序中包含 Ionic Framework:
Including Ionic Framework
Ionic Framework provides CSS and JavaScript libraries that you would include in your HTML. There are two methods for including Ionic Framework in your trigger.io app:
- 您可以从 Ionic CDN 下载 Ionic CSS 和 JavaScript 文件.
- 将 JS、CSS 和 fonts 文件夹添加到您的 src 文件夹中.
- 在您的
index.html
文件中引用 ionic.min.css 和 ionic.bundle.js,如下所示:
- You can download the Ionic CSS and JavaScript files from the Ionic CDN.
- Add the JS, CSS, and fonts folders to your src folder.
- Reference ionic.min.css and ionic.bundle.js in your
index.html
file like so:
<link href="/css/ionic.min.css" rel="stylesheet"></link>
<script src="/js/ionic.bundle.js"></script>
- 这与在 HTML 中包含任何其他库相同.
- 请注意,AngularJS 包含在
ionic.bundle.js
中,所以我会建议查看 AngularJS API 文档. - This is the same as including any other libraries in your HTML.
- Note that AngularJS is included in
ionic.bundle.js
, so I would suggest checking out the AngularJS API documentation.
内容交付网络 (CDN) 是一种服务器系统,可将文件交付给根据位置高效地为客户提供服务.
A content delivery network (CDN) is a system of servers that delivers files to a client efficiently based on location.
您可以通过从 Ionic CDN 链接它们来将 Ionic 文件包含在您的项目中:
You can include Ionic files in your project by linking them from the Ionic CDN:
<link href="http://code.ionicframework.com/1.0.0-beta.1/css/ionic.css" rel="stylesheet">
<script src="http://code.ionicframework.com/1.0.0-beta.14/js/ionic.bundle.js"></script>
当 Ionic 仍处于测试阶段时,您应该确保在发布新版本时始终更改 CDN 链接或下载新文件.
While Ionic is still in the beta stages you should make sure to always change your CDN link or download the new files whenever they release a new version.
如果可能,我会避免使用 CDN,因为如果手机失去互联网连接,它会导致问题.这也意味着您每次运行应用程序时都要重新下载文件.
我还建议您查看 Firebase,这是一款出色的移动应用后端解决方案.它还可以处理用户身份验证.
I'd also suggest checking out Firebase, a great backend solution for mobile apps. It can also handle user authentication.
<script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.9.2/angularfire.min.js"></script>
这篇关于我需要采取哪些步骤才能在 trigger.io 中使用 Ionic 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!