Created
October 29, 2016 04:08
-
-
Save TaylorAckley/f81125bf5606154ea3f886aa7b6ec372 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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