// js/controllers/users-index-controller

(function() {
  "use strict";

  angular.module("NoteWrangler")
    .controller("UsersIndexController", UsersIndexController);

  UsersIndexController.$inject = ["User"];

  function UsersIndexController(User) {
    let vm = this;

    vm.getAvatar = getAvatar;

    getAllUsers();

    function getAllUsers() {
      User.getAllUsers()
      .success( (usersData) => {
        vm.users = usersData;
      });
    }

    function getAvatar(email) {
      return Gravatar.getAvatar(email);
    }
  }

})();

@@ -203,16 +203,28 @@
  %5B%22User%22
+, %22Gravatar%22
 %5D;%0A%0A  fu
@@ -255,16 +255,26 @@
 ler(User
+, Gravatar
 ) %7B%0A    

Add to DI Gravatar provider