Building an Address Book App

In the earlier examples, we saw the different ways of creating models. When creating production grade or large-scale applications, which involve graphical interfaces, it is compulsory to follow the Model View Controller (MVC) design pattern.

Building on the previous code example, we'll go ahead and build a simple Address Book App.

Let's start by creating our models in a controller called PeopleController. We'll now write all our JavaScripts in a file called scripts.js. Your scripts.js file should look like this:

function PeopleController($scope){ $scope.people=[ {name:"John Doe", phone: "3452345678", city:"New York"}, {name:"Sarah Parker", phone: "1236548769", city:"Chicago"}, {name:"Little John", phone: "4567853432", ...

Get AngularJS Web Application Development Blueprints 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.