Ionic quick installation tutorial, Ionic installation tutorial

Source: Internet
Author: User
Tags install node

Ionic quick installation tutorial, Ionic installation tutorial

Today, let's learn how to install Ionic to build a simple small application on your computer. Many websites write complicated installation methods. In fact, beginners who are just learning ionic, especially those who do not have a lot of programming experience, will they be scared away? What node. js environment does it feel so complicated? install the latest version of cordova... ... In fact, it does not need to be so troublesome. Let me tell you how to use ionic when working on a project.

Method 1: directly introduce and use


Step 1: first download Ionic

The latest ionic version: http://ionicframework.com/docs/overview/javasdownload.

Decompress the downloaded package, which contains the following directories:

Copy codeThe Code is as follows:
Css/=> Style File
Fonts/=> font files
Js/=> Javascript file
Version. json => version update description

You can also download the following resource file on Github: https://github.com/driftyco/ionic (in the release directory ).

Step 2 introduce the file

Next, we only need to introduce the css/ionic.min.css and js/ionic. bundle. min. js files in the above directory in the project to create the ionic application.

<Ion-header-bar class = "bar-positive"> 

Note: In mobile apps such as phonegap, we only need to add the corresponding js and css files to the resource library.

Method 2: Install using the command line

First, install Node. js. Then, use the command line tool to install the latest version of cordova and ionic. Install the SDK by referring to the official Android and iOS documents.

On Windows and Linux, open the command line tool and execute the following command:

Copy codeThe Code is as follows:
$ Npm install-g cordova ionic

Use the following command on Mac:

Copy codeThe Code is as follows:
Sudo npm install-g cordova ionic

Tip: IOS must be installed and used in Mac OS X. And Xcode environments.

If you have installed the above environment, you can run the following command to update the version:

Copy codeThe Code is as follows:
Npm update-g cordova ionic

Or

Copy codeThe Code is as follows:
Sudo npm update-g cordova ionic

Create an application

Create an ionic application using an officially available ionic application template or a blank project:

Copy codeThe Code is as follows:
$ Ionic start myApp tabs

Run the ionic project we just created

Use ionic tool to create, test, and run your apps (or directly create apps through Cordova ).

Create an android app:

Copy codeThe Code is as follows:
$ Cd myApp
$ Ionic platform add android
$ Ionic build android
$ Ionic emulate android

Create an ios app:

Copy codeThe Code is as follows:
$ Cd myApp
$ Ionic platform add ios
$ Ionic build ios
$ Ionic emulate ios

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.