O'Reilly logo

PhoneGap and AngularJS for Cross-platform Development by Eugene Liang Yuxian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A simple to-do list using AngularJS

In this example, we will cover in detail as to how to write code for a slightly more complicated AngularJS app. This app is modified from the official example found at angularjs.org. This example will be used as a base when we convert it from a web application to a PhoneGap application.

Preparing your code structure

For starters, create the index.html and todo.js files. Just for your information, the code found in this section can be found in the todo folder in Chapter 1.

HTML for our to-do list

We need to prepare our HTML file so that we can make use of AngularJS. Similar to the previous concepts.html file, you will see that we have included the use of AngularJS via script. Open up your index.html file in your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required