users-index-controller.js 356 B

1234567891011121314
  1. angular.module('NoteWrangler').controller('UsersIndexController', function($scope, User, $gravatar) {
  2. // Without NgResource
  3. // User.all().success(function(data) {
  4. // $scope.users = data;
  5. // });
  6. // With NgResource
  7. $scope.users = User.query();
  8. $scope.gravatarUrl = function(user) {
  9. return $gravatar.generate(user.email);
  10. }
  11. });