Ionic Starter

Step By Step

Step 1

  • Install Ionic and Cordova
    • npm install -g ionic
    • npm install -g cordova

Step 2

  • Create new project
    • ionic start starter tabs
    • cd starter
    • ionic serve -c

Step 3

  • Add controllers and services
    • Add js/controllers.js
    • Add js/services.js
    • Add controllers and services to index.html
  • Add templates
    • Add templates/dash.html
    • Add templates/person.html
    • Add templates/simple.html
    • Add templates/tabs.html

Step 4

  • Add routing
  • Add empty service
  • Add tabs to tabs.html
  • Add nav-bar and nav-view to index.html

Step 5

  • Add simple page

Step 6

  • Add data service

Step 7

  • Add dashboard

Step 8

  • Add person detail

Step 9

  • Add status bar style

  • Native app tools

    • Install Xcode
    • Install Android Studio
  • Add platform and plugin

    • ionic platform add ios
    • ionic plugin add org.apache.cordova.statusbar
  • Run on device with live reload

    • ionic emulate ios --l --c
  • Useful commands

    • ionic emulate ios
    • ionic build ios
    • ionic run ios
    • ionic platform add android
    • ionic build android

Debugging

  • Safari - Dev Tools
  • Chrome - Dev Tools