Original link
Installing Ionic
Update the files in the Www/lib/ionic directory, if there are bower in the project, this command will run Bower update Ionic, otherwise the files will be downloaded and replaced from the Cdn.
Create a project in which the template can be a built-in profile type: Blank/sidemenu/tabs (default) Three, or it can be a github address (this is called ionoic-starter), or Codepen starter address
Optional parameter:-a your_app_name-i com.yourcompany.youapp-w (do not use Cordova)
Ionic start Your_app_name [Template] |
Launches a local server, opens in a browser, and monitors file changes to refresh the browser at any time.
Open the iOS and Andriod display screen in the browser
Indicates an external IP address that can be viewed by external users.
Ionic Serv--address 192.168.89.1 |
Add target Platform
Ionic Platform Add ios/android |
Build a platform
Using the simulator to simulate iOS, this command is equivalent to: Ionic run iOS
Ionic emulate iOS [options] //ionic run iOS [options] |
Run the app using an emulator or device.
Options include the following:
-L//livereload, real-time refresh changes. |
-S//console for printing equipment |
-P//port of the specified device |
-I//specify Livereload for the brush port |
When in livereload mode, use R to restart the client, use G Your_url to jump to the specified URL, use C to start or close the console, use S to start or close the console of the device, and use Q to exit.
You can configure the folders to be monitored in the watchpatterns of the Ionic.project file in the home directory. Such as:
{ "name": "", "app_id": "", } |
Ionic will upload local resource files (which support PNG, PSD, and AI, the bigger the better) to its server for processing.
The local resource file is placed under the resources directory, and if it is a separate resource for a platform, it can be placed under the corresponding platform, such as Resources/android/icon.png.
This will automatically put the processed resources on the platform, not all platforms.
Ionic resources [--splash] [--icon] |
The command uploads its own project to the Ionic server, which will have a project number when the upload is completed.
Install Ionic view app and log in with Ionic's account to view your project.
You can also go directly to the Ionic app website and download apps from other platforms.
viewing system conditions
Android does not have a good browser performance, you can install a shell (crosswalk), which will install a chromium kernel.
Ionic browser Add Crosswalk |
View the Available browser
Remove the installed browser
Ionic browser revert Android/ios |
Remove the platform and plug-ins first, and then install the platforms and plugins in the Package.json file.
First look at the platform and save the name and Package.json under the Cordovaplatforms property.
Then view the Fetch.json file, save the Cordova Plugin registry, locally installed plug-ins, and remote plug-ins from github or remote HTTP URLs
Remove the platform and plug-ins first, and then reinstall them by following the platforms and plugins included in the Package.json file.
Ionic Common command-line explanations