/*
 * app.js
 *
 * Contains the angular logic for the app.
 */ 
angular.module('contactsApp', ['ngRoute'])
    .config(function($routeProvider)) {
        $routeProvider
        .when('/', {
            templateUrl: 'list.html',
            controller: 'ListController',
            resolve: {
                contacts: function(Contacts) {
                    return Contacts.getContacts();
                }
            }
        })
    }
    .service('Contacts', function($http) {
        this.getContacts = function() {
            return $http.get('/contacts').
                then(function (response) {
                    return response;
                }), function (response) {
                    alert('Error retrieving contacts.');
                }
        }
    })
    .controller('ListController', function(contacts, $scope) {
        $scope.contacts = contacts.data;
    });

@@ -430,24 +430,143 @@
    %7D)%0A    %7D%0A
+    .when('new/contact', %7B%0A        controller: 'NewContactController',%0A        templateUrl: 'contact-form.html'%0A    %7D)%0A
     .service

add new contact Angular route