Ionic Quick Installation Tutorials _javascript Tips

Source: Internet
Author: User
Tags install node

Today, let's learn how to install ionic to build a simple small application on your own computer. Many websites will write very complex installation methods, in fact, just beginning to learn ionic beginners, especially without a lot of programming experience is not a small partner will scare away? Feel so complex need to install what Node.js environment Ah, install the latest version of the Cordova Ah ... Actually, it doesn't have to be that much trouble. Tell us how to use the ionic when I do the project.

The first method: direct introduction of the use


The first step, first download ionic

Ionic Latest version download address: http://ionicframework.com/docs/overview/.

After downloading, unzip the compressed package, including the following directory:

Copy Code code as follows:

css/=> Style File
fonts/=> Font File
js/=> JavaScript File
Version.json => Version Update description

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

Step two, introduce the file

Next, we just need to introduce the CSS/IONIC.MIN.CSS and js/ionic.bundle.min.js files in the above directory into the project to create the Ionic application.

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

Note: in mobile applications such as PHONEGAP, we simply add the corresponding JS and CSS files to the repository.

Second method: command-line installation

First you need to install Node.js. Then install the latest version of Cordova and Ionic with command-line tools. Installed by reference to the official Android and IOS documentation.

Windows and Linux to open the command line tool to execute the following command:

Copy Code code as follows:

$ npm install-g Cordova Ionic

The following commands are used on the MAC system:

Copy Code code as follows:

sudo npm install-g Cordova Ionic

Tip: iOS needs to be installed under Mac Os X. and Xcode environments.

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

Copy Code code as follows:

NPM update-g Cordova Ionic

Or

Copy Code code as follows:

sudo npm update-g Cordova Ionic

Create an application

Use the Out-of-the-box application templates provided by ionic, or a blank project to create a ionic application:

Copy Code code as follows:

$ Ionic Start myApp tabs

Run the Ionic project we just created

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

Create Android Apps:

Copy Code code as follows:

$ CD MYAPP
$ Ionic Platform Add Android
$ Ionic Build Android
$ Ionic Emulate Android

Create iOS Apps:

Copy Code code as follows:

$ CD MYAPP
$ Ionic Platform Add iOS
$ Ionic Build iOS
$ ionic Emulate iOS

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.