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 our project. In this folder, let's create our first view file, as follows:
www/templates/contacts.html
If we need to add additional views to our app, we will do it in the same manner. Partitioning our views like this not only makes organization...