Here is a some sample code for how to create a contact list using angular scope and resources. Hope this helps.
<script src="~/Scripts/angular.js"></script>
<script src="~/Scripts/angular-resource.js"></script>
<script src="~/Scripts/models/contactsController.js"></script>
Here is the body of the contactsController file
var mainApp = angular.module('mainApp', ['contactsControllers','contactsServices']);
var contactsService = angular.module('contactsServices', ['ngResource']);
var contactsControllers = angular.module('contactsControllers', []);
contactsService.factory('Contacts', ['$resource',
function ($resource) {
return $resource('/Home/Contacts', {}, {
query: { method: 'POST', params: {}, isArray: true }
});
}]);
contactsControllers.controller('contactListController',
['$scope', 'Contacts',
function ($scope, Contacts) {
var contacts = [];
Contacts.query(function (data) {
angular.forEach(data, function (person) {
contacts.push(person);
});
$scope.contacts = contacts;
});
}]);