O'Reilly logo

Learning Node.js for Mobile Application Development by Milorad Jevdjenic, Stefan Buttigieg

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

Creating a basic MVC project

Our goal in this chapter is to create an app that can pull information from the contacts storage of the local device and display it to the user (a phonebook, if you like). To do so, we need to do the following things:

  • Define a view (template file) to display the contact list
  • Define a controller in order to handle interactions with the list
  • Provide the necessary model logic in order to provide contacts' information.

You may recall that this workflow fits nicely with the overall architecture of AngularJS, which follows the MVC pattern. We will take care of each item in turn.

Creating the view

Go ahead and add the following folder to your projects:

www/templates

Here, we will store all the view templates that we will use throughout ...

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