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

Wiring up a backend server

In this section, we will make use of the $http module of AngularJS to make RESTful calls to a simple backend server. The backend server here is based on Facebook's Tornado Framework (https://github.com/facebook/tornado/), but the fact is that you can make RESTful calls using Express.js (http://expressjs.com/) or any other framework that you like.

Before you get started with this section, you will need to have MongoDB (http://www.mongodb.org/), Python 2.7.x, and the Tornado web server installed. You will also need to install a Python library called tornado-cor (https://github.com/globocom/tornado-cors), which facilitates the use of cross-origin resources between your AngularJS app and server.

Coding our server

The main idea ...

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