Chapter 7. Building Our Ionic2Do App

With our development environment configured, some initial exposure to Angular 2, and a foundation in Apache Cordova, we are finally ready to start creating our first Ionic 2 application. As not to break with tradition, we are going to be building the classic to-do list management application. You might wonder why we would build something that has been built so many times before. Part of the reason is that for many of you, building something familiar will let you begin to map how Ionic works to whatever language or framework you might be more familiar with. Another reason is that a to-do app has more complexity that simply printing out “Hello World” on a screen.

To get started we need to create a new Ionic project. We will use the blank template as our basis:

$ ionic start Ionic2Do blank --v2

Make sure you include the --v2 flag; otherwise you will create an Ionic version 1 application. The --v2 flag will tell the Ionic CLI that you want a version 2 project.

The CLI will begin downloading the various elements for the project: the TypeScript components, the Node modules, and finally the required Cordova components. This process may take a few minute, depending on your internet connection. If you have done Ionic v1 development, you will notice that this process is a bit longer than before.

Once all the packages have been downloaded, the CLI will happily inform you that your Ionic app is ready to go!

Next, you need to make sure you change the ...

Get Mobile App Development with Ionic 2, 1st 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.