AngularJS之移动开发

一、开发框架

 Ionic 框架:基于HTML5,CSS3  官网:http://www.ionic.wang;

cordova :打包工具,打包跨平台的APP程序,提供跨平台的API库 plugins.cordova.io

ngcordova:AngularJS中的操作cordova库 网站:ngcordova.com/docs/plugins/

 二、平台安装

  1、安装ionic  npm install -g cordova ionic

三、创建框架

  ionic start myapp tabs //创建tab类型的框架 (我的环境:/usr/local/lib/node_modules/cordova/bin/cordova,/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java)

 * cd into your project: $ cd myapp

 * Setup this project to use Sass: ionic setup sass

 * Develop in the browser with live reload: ionic serve

 * Add a platform (ios or Android): ionic platform add ios [android]
   Note: iOS development requires OS X currently
   See the Android Platform Guide for full Android installation instructions:
   https://cordova.apache.org/docs/en/edge/guide_platforms_android_index.md.html

 * Build your app: ionic build <PLATFORM>

 * Simulate your app: ionic emulate <PLATFORM>

 * Run your app on a device: ionic run <PLATFORM>

 * Package an app using Ionic package service: ionic package <MODE> <PLATFORM>

For more help use ionic --help or ionic docs

posted @ 2015-11-11 12:02  LAOS  阅读(239)  评论(0编辑  收藏  举报