Skip to content

Instantly share code, notes, and snippets.

@TaylorAckley
Created October 29, 2016 04:08
Show Gist options
  • Save TaylorAckley/f81125bf5606154ea3f886aa7b6ec372 to your computer and use it in GitHub Desktop.
Save TaylorAckley/f81125bf5606154ea3f886aa7b6ec372 to your computer and use it in GitHub Desktop.
"use strict";
;(function() {
angular
.module('xxx')
.controller('HomeCtrl', HomeCtrl);
HomeCtrl.$inject = ['$scope', '$http', '$state', '$location', '$stateParams', 'LocalStorage', 'QueryService', 'Account', 'Videos', 'toastr'];
function HomeCtrl($scope, $http, $state, $location, $stateParams, LocalStorage, QueryService, Account, Videos, toastr) {
$scope.getUser = Account.getUser()
.then(function(response) {
$scope.user = response.data;
})
.catch(function(response) {
console.log(response);
toastr.error(response.data.message, response.status);
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment