(function() { 'use strict'; angular .module('app') .controller('UserLogCtrl', UserLogCtrl); UserLogCtrl.$inject = ['$scope', 'smartRequest', '$rootScope']; function UserLogCtrl($scope, smartRequest, $rootScope) { $scope.logs = []; $scope.getLogs = function() { smartRequest.get('log/user/list', function(data) { $scope.logs = data.logs; }); }; $scope.getLogs(); } })();