evoapp.controller('AcidentesTrabalhoController', function($rootScope, $scope, $timeout, $compile, $injector, $filter, globals) { $scope.globals = globals; $scope.globals = globals; $scope.showList = true; $scope.showEdit = false; var acidentesTrabalho = [ { id: 1, descricao: 'acidente 1', data: '2009-08-03T00:00:00.000+0100' }, { id: 2, descricao: 'acidente 2', data: '2011-01-01T00:00:00.000+0100' } ]; $scope.storeAcidentesTrabalho = new globals.dataService.store({ model: null, actions: { //get: 'getcidentesTrabalho' } }); $scope.list = function(){ //$scope.storeAcidentesTrabalho.get(function(response, status, headers, config, items){ //}); $scope.storeAcidentesTrabalho.loadData(acidentesTrabalho); }; $scope.download = function(item){ globals.message.alert({ message: 'Abrir o documento: ' + item.descricao, callback: function(){ } }); }; $scope.$on('afterrender', function(event, args){ $scope.list(); }); });