Ionic 2 Tutorial

Improve this doc

Now that you have Ionic and its dependencies installed, you can build your first app! This section will guide you through the process of starting a new application, adding pages, navigating between those pages, and more. Let’s get started!

Ionic uses TypeScript for its code. If you’re unfamiliar with TypeScript, take a look at this page.

Starting a New Ionic 2 App

Starting a new app is easy! From your command line, run this command:

$ ionic start MyIonic2Project tutorial --v2

Along with creating your project, this will also install npm modules for the application, and get Cordova set up and ready to go.

If the tutorial template isn’t something you want to use, Ionic has a few templates available:

If you don’t specify a template by running ionic start MyIonic2Project --v2, the tabs template will be used.

Viewing the app in a browser

Now, you can cd into the folder that was created. To get a quick preview of your app in the browser, use the serve command.

$ cd MyIonic2Project/
$ ionic serve

You should see the welcome message shown above if everything was installed successfully.

In the next section, let’s go over the project structure created by the ionic start command.