设置 Ionic 开发环境

improve this page | report issue


概述

Ionic 是一个构建在 AngularJSApache Cordova 之上的框架,可帮助您使用 Web 技术(例如,HTML、CSS 和 Javascript)快速构建混合移动和 Web 应用程序。

如果您是选择 Ionic 作为框架开发移动或 Web 应用程序的开发人员,那么以下部分可帮助您开始在 Ionic 应用程序中使用 IBM Mobile Foundation SDK。

您可以使用自己首选的代码编辑器(如 Atom.io、Visual Studio Code、Eclipse、IntelliJ 等)来编写您的应用程序。

先决条件:设置 Ionic 开发环境时,请确保您还阅读了设置 MobileFirst 开发环境教程。

安装 Ionic CLI

要开始使用 Ionic 开发,需要执行的第一步是安装 Ionic CLI

要安装 cordova 和 ionic CLI:

  • 下载并安装 NodeJS
  • 从命令行窗口中,运行以下命令:
    npm install -g ionic
    

将 Mobile Foundation SDK 添加到 Ionic 应用程序

要在 Ionic 应用程序中继续使用 MobileFirst 开发,需要将 MobileFirst Cordova SDK 或插件添加到 Ionic 应用程序。

了解如何将 MobileFirst SDK 添加到 Cordova 应用程序。 有关应用程序开发,请参阅教程:将 Mobile Foundation SDK 添加到 Ionic 应用程序

Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on June 01, 2020