Creating a HelloWorld app via the CLI

It's quickest to start your app using the existing templates. Ionic gives you the following three standard out-of-the-box templates via the command line:

  • Blank: This is a simple page with minimal JavaScript code.
  • Tabs: These are multiple pages with routes. A route URL goes to a tab.
  • Side menu: This is a template with a left/right menu with center content area.

How to do it…

  1. To set up the app with a blank template from Ionic, use this command:
      $ ionic start HelloWorld_Blank blank --v2
    

    Note

    If you don't have an account in ionic.io, the command line will ask for it. You could either press y or n to continue. It's not mandatory to have an account at this step.

  2. If you replace blank with tabs, it will create a tab template, ...

Get Ionic 2 Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.