ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/
Create Project Create Project (cont) Local Dev-Server (cont)
start Starts a new Ionic project in the [--skip- Skip npm package installation [-- Specifies a path to open to
[options] specified PATH [options] any flags npm] browseropt (/#/tab/dash)
<PATH> for the command <PATH> ion|-o]
[-- Create a basic structure without
[template] directory for the new project
no-cordov Cordova requirements [--lab|-l] Test your apps on multiple
[template] Starter templates can
a|-w] screen sizes and platform types
either come from a named
[--sass|-s] Setup the project to use Sass [--nogulp] Disable running gulp during serve
template, (ex: tabs, sidemenu,
CSS precompiling
blank), a Github repo, a Codepen [-- Start serve with a specific
url, or a local directory. Codepen [--list|-l] List starter templates available platform|-t] platform (ios/android)
url, ex: [--io-app- The Ionic.io app ID to use
http://codepen.io/ionic/pen/odqCz id] Ionic Cloud
Defaults to Ionic "tabs" starter
[-- Project starter template io Integrate your app with Ionic Cloud
template
template|- <comm services <command> init
[-- Human readable name for the app t] and>
appname| (Use quotes around the name)
[--v2|-v] Start a Ionic v2 project
-a]
Package
[--zip- URL to download zipfile for starter
[--id|-i] Package name for <widget id>
file|-z] template package Use Ionic Package to build your
config, ex:
com.mycompany.myapp <comman app <command> build android,
Local Dev-Server d> build ios, list, info, or download
[options]
serve Start a local development server
[options] for app dev/testing [-- (build <platform>) Mark this build
release] as a release
[-- Print app console logs to Ionic
consolelogs CLI [-- (build <platform>) Specify the
|-c] profile|-p Security Profile to use with this
<tag>] build
[-- Print dev server logs to Ionic CLI
serverlogs|- [-- (build <platform>) Do not generate
s] noresourc icon and splash screen resources
es] during this build
[--port|-p] Dev server HTTP port (8100
default) [-- (download) Specify the
destinatio destination directory to download
[-- Live Reload port (35729 default)
n|-d your packaged app.
livereload-
<path>]
port|-r]
[-- Disable launching a browser Adding Stuff
nobrowser|-
b] add Add an Ion, bower component, or
[name] addon to the project [name] The name
[-- Do not start live reload
of the ion, bower component, or
nolivereload
addon you wish to install
|-d]
[-- Do not add proxies
noproxy|-x]
[-- Use specific address or return
address] with failure
[--all|-a] Have the server listen on all
addresses (0.0.0.0)
[-- Specifies the browser to use
browser|-w] (safari, firefox, chrome)
By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com
cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 1 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/
Adding Stuff (cont) Project Setup Runnning the App
remove Remove an Ion, bower component, setup Configure the project with a build tool run Run an Ionic project on a
[name] or addon from the project [name] The [sass] (beta) [sass] Setup the project to use <PLATFORM> connected device
name of the Ion, bower component, Sass CSS precompiling [options]
or addon you wish to remove
[--livereload|-l] Live reload app dev files from
Scaffolding the device (beta)
Misc. Ionic Commands
generate Generate pages and components [--address] Use specific address
list List Ions, bower components, or (livereload req.)
[--list] List available generators
addons in the project [--port|-p] Dev server HTTP port (8100
[-- Create test spec basic to pages,
info List information about the users default, livereload req.)
includeS components, directives, pipes and
runtime environment [-- Print app console logs to
pec] providers
help Provides help for a certain consolelogs|-c] Ionic CLI (livereload req.)
[-- Not create scss for components
[command] command [command] The [--serverlogs|- Print dev server logs to Ionic
skipScss and pages
command you desire help with s] CLI (livereload req.)
]
hooks Manage your Ionic Cordova [-- Path directory target is created [--debug|--release]
[add|remov hooks compone component [--device|--emulator|--target=FOO]
e|permissi [add|remove|permissions|perm]
ntsDir]
ons|perm] Add, remove, or modify
[-- Path directory target is created Emulating the App
permissions on the default Ionic
directive directive
Cordova hooks emulate Emulate an Ionic project on
sDir]
<PLATFORM> a simulator or emulator
Linking App-ID to Project [-- Path directory target is created
[options]
pagesDir page
link Sets your Ionic App ID for your project [--livereload|-l] Live reload app dev files
]
[appId] [appId] The app ID you wish to set for from the device (beta)
[-- Path directory target is created pipe
this project [--address] Use specific address
pipesDir]
[-- This will reset the Ionic App ID (livereload req.)
[-- Path directory target is created
reset|- [--port|-p] Dev server HTTP port
providers provider
r] (8100 default, livereload
Dir]
req.)
[-- Path directory templates custom to
[--consolelogs|- Print app console logs to
template pages, components, directives,
c] Ionic CLI (livereload req.)
Dir] pipes and providers
[--serverlogs|-s] Print dev server logs to
Platform Stuff Ionic CLI (livereload req.)
[--debug|--release]
platform Add platform target for
<PLATFORM> building an Ionic app [--device|--emulator|--target=FOO]
[options]
[-- Do not add default Ionic Push
noresources|-r] icons and splash screen push Upload APNS and GCM
resources credentials to Ionic Push
[--nosave|-e] Do not save the platform to [--ios- Upload your development .p12 file
the package.json file dev-cert] to Ionic Push
[--ios- Upload your production .p12 file to
prod-cert] Ionic Push
By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com
cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 2 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/
Push (cont) Building Stuff Uploading
[--production- Tell Ionic Push to use build Build (prepare + compile) an upload Upload an app to your Ionic
mode=y,n] production (y) or sandbox (n) <PLATFORM Ionic project for a given account
APNS servers > [options] platform.
[--email|-e] Ionic account email
[--google-api- Set your app's GCM API key [--nohooks|- Do not add default Ionic hooks [-- Ionic account password
key on Ionic Push n] for Cordova password|-
<your-gcm-api- p]
key>] Plugins
[--note] The note to signify the upload
plugin Add a Cordova plugin <SPEC> Can [--deploy Deploys the upload to the given
App Configuration
add be a plugin ID, a local path, or a git <channel_t channel. Defaults to the Dev
config Set configuration variables for [options] URL. ag>] channel
<command your ionic app <command> set, <SPEC
> [key] unset, build, or info >
Sharing
[value] [-- When looking up plugins by ID, look
share Share an app with a client, co-worker,
[key] The key to set searchp in this directory and subdirectories
<EM‐ friend, or customer <EMAIL> The email
[value] The value to set ath first for the plugin before looking it
AIL> to share the app with
<directo up in the registry.
Save and Restore App. State ry>]
Ionic Library
[-- Do not save the plugin to the
state Saves or restores state of your Ionic
nosave|- package.json file lib Gets Ionic library version or updates
<COM Application using the package.json
e] [options] the Ionic library. [update] Updates
MAND> file <COMMAND> [ save | restore |
[update] the Ionic Framework in
clear | reset ]
Resources www/lib/ionic
[save] Save the platforms and plugins into
[-- Specific Ionic version Otherwise it
package.json resources Automatically create icon and
version|- defaults to the latest version
splash screen resources (beta)
[restore] Restore the platforms and plugins v]
from package.json [--icon|-i] Generate icon resources
[clear] Clear the package.json of [-- Generate splash screen resources Ionic Login
cordovaPlugins and splash|-s]
login Login to your Ionic account
cordovaPlatforms, as well as clear
Put your images in the ./resources directory,
out the platforms and plugins folders [--email|-e] Ionic account email
named splash or icon.
[reset] Clear out the platforms and plugins Accepted file types are .png, .ai, and .psd. [--password|-p] Ionic account password
directories, and reinstall plugins and Icons should be 192x192 px without rounded
platforms corners.
[-- Only do operations with plugins Splashscreens should be 2208x2208 px, with
plugins] the image centered in the middle.
[-- Only do operations with platforms
platform
s]
By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com
cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 3 of 4. http://crosswordcheats.com
ionic 2 Cheat Sheet
by JavaVolker via cheatography.com/25591/cs/10518/
Security Ionic Documentation
security Store your app's credentials for the docs Opens up the documentation for Ionic
<comma Ionic Cloud <command> profiles list, <TOP
nd> profiles add "<name>", credentials IC>
[options] android, or credentials ios
<TOPIC> the topic to view help
[--profile (credentials <platform>) Specify the documentation for. Use "ls" to view all
<tag>] profile on which these credentials topics
are saved
[-- (credentials android) Specify the
keystore| location of your keystore file
-s
<path>]
[-- (credentials android) Specify your
keystore keystore password (exclude for
-passwo prompt)
rd|-p
<passwo
rd>]
[--key- (credentials android) Specify your
alias|-k key alias for this app
<alias>]
[--key- (credentials android) Specify your
passwor key password for this app (exclude
d|-w for prompt)
<passwo
rd>]
[--cert|-c (credentials ios) Specify the location
<path>] of your .p12 file
[--cert- (credentials ios) Specify your
passwor certificate password (exclude for
d|-p prompt)
<passwo
rd>]
[-- (credentials ios) Specify the location
provision of your .mobileprovision file
ing-
profile|-r
<path>]
By JavaVolker Published 24th January, 2017. Sponsored by CrosswordCheats.com
cheatography.com/javavolker/ Last updated 13th January, 2017. Learn to solve cryptic crosswords!
Page 4 of 4. http://crosswordcheats.com