As an iOS developer, the development trend of mobile development is quite concerned. As we all know, the primary mobile development is rarely used in the enterprise, most enterprises in order to reduce costs, the choice of Webapp,hybrid (mixed development) of the two models. I happen to be in a company to do mixed development, yes, you guessed right, here I say the mixed development method refers to cordova+angularjs+ionic mixed development (in order to save time, less nonsense, the following I say "it" means "cordova+ Angularjs+ionic mixed development "), so in this case, I take it for granted, and familiar with it, so that it is technically completely OK (exceptional case), of course, know it after the cordova+angularjs+ Ionic's development model for this framework is promising, at least for now.
Overall, it's easy to get started, and there's not a lot of technical difficulty, of course, the premise is that you have a bit of work experience, as long as it is not just training out, basically no problem, just the time problem, OK, the following I focus on the technical aspects of the steps, here to understand the words, too waste time, at least the company is not afford ... (Hahaha, play jokes, specific questions do not know how to find a Niang)
A brief description of the concept:
Ionic is a powerful HTML5 development framework that runs relatively fast, and jqmobi about the same, is a lightweight framework based on ANGULARJS and supports ANGULARJS features and MVC. Building an application through SASS, it provides a number of UI components to help developers develop powerful applications. It uses JavaScript MVVM frameworks and Angularjs to enhance applications. Provides two-way binding of data, using it to become a common choice between Web and mobile developers, so as long as HTML, CSS, JS can be developed app. It's definitely good for a programmer to have a new technology with free contact.
Second, the environment to build: "iOS version, Mac Environment"
How to install: command line
1. Install NPM, Node.js
Open the terminal and enter the following:
Npm-v
Node-v
See if the results install NPM and node
If NPM or node may not be the latest version or not installed, you can download the latest version to Nodejs's official website "https://nodejs.org/en/".
2. Installation of Ionic and Cordova
For some reason, the domestic network installs ionic and Cordova to have the error, therefore must skip certain walls. Using the Taobao NPM mirror. Open the terminal and enter the following command directly. "Before adding" sudo ", see the situation, do not add the words will not be added, add the words input computer boot password can be"
First remove the existing Ruby mirror
Gem Sources--remove https://rubygems.org/
Then add the latest domestic mirror source https://gems.ruby-china.org/(Taobao Ruby Mirror https://registry.npm.taobao.org has not been updated, of course, you can also use)
NPM install-g cnpm--registry=https://registry.npm.taobao.org
The ionic and Cordova packages can be installed via the NPM image of Taobao.
Before installing ionic and Cordova, Express is installed first
Follow these steps:
1) npm Install Express
2 sudo npm install-g ionic
3 sudo npm install-g Cordova [default latest Version]
Cordova failed to install via NPM on Mac
http://blog.csdn.net/jiangtongcn/article/details/46863743
Error reason summary *******************************************
Error:EACCES:permission denied, open '/users/niubangzhu/.config/configstore/insight-cordova.json '
Website: http://wenku.baidu.com/link?url=YAQmFTohv4ho_eicqLLl6qjZ2zbgscgnxVdY0KjDcbTE_ Ilpcteudsfhha7dbyjxqbyc4q1l2tp0jeqrjseg3siqz92sm0exbtoxdk0o5ok
Note: If the installation is successful, CORDOVA-V does not display the version number, indicating that the installation path could not be found, the following processing is done:
Put/users/sure001/"d://user/local ..... The files under the [default installation path]/lib/node_modules are copied to the/usr/local/lib/node_modules folder.
===================================================
After visual installation success, cordova-v error, try the following solution:
Open Finder,commond+shift+g, enter "/users/niubangzhu/.config/configstore/insight-cordova.json" in the box, Delete the file Insight-cordova.json, perform the installation Cordova again, and then try Cordova-v success ... Congratulations
After the installation is successful, to see if all installed packages are installed. Run the command:
Ionic info
Failure to install
If the given content is red, it means that the installation failed, and the installation of the content is OK.
**ps: It is not possible to compile in this environment without installation, but it has no effect on browser running. * *
' Ios-sim ' represents the simulator's operating environment,
' Ios-deploy ' represents the operating environment of the real machine.
To run the command:
NPM install-g Ios-sim, no, just add sudo.
NPM install-g Ios-deploy, no, just add sudo.
NPM install-g The workaround for the Ios-deploy failure problem, run the following command:
sudo npm install-g ios-deploy--unsafe-perm=true