freeCodeCamp/guide/chinese/ionic/index.md

45 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Ionic
localeTitle: 离子的
---
## 离子框架
Ionic是一个HTML5移动应用程序开发框架旨在构建混合移动应用程序。
混合应用程序与纯本机应用程序相比具有许多优势,特别是在平台支持,开发速度和第三方代码访问方面。
### 使用Ionic构建混合应用程序
那些熟悉Web开发的人会发现Ionic app的结构很简单。从本质上讲它只是一个在本机应用程序shell中运行的网页这意味着我们可以使用我们想要的任何类型的HTMLCSS和Javascript。
大量的Ionic应用程序将使用HTMLJavascript和CSS编写。 Ionic还使用AngularJS来实现框架的许多核心功能。
### 在我们开始玩Ionic之前。让我们先准备好我们的系统
```
nodeJS and npm
Ionic 2
Cordova
Android Environment (or iOS if you're working on a MacOS)
```
### 首先我们需要有Node.js和npm。
```
sudo apt-get update
sudo apt-get install nodejs
```
### Node.js包管理器npm
\`\`\`
sudo apt-get install npm
```
### Ionic 2 and cordova
```
sudo npm install -g ion cordova
```
### Now sit back and relax, give it some time to finish, it can take several minutes depending on your internet connection.
Once that's done, Let's start off by generating a new project based on the “blank” template
```
离子启动MyFirstApp空白 cd MyFirstApp 离子发球 \`\`\`