17 lines
504 B
JavaScript
17 lines
504 B
JavaScript
'use strict';
|
|
|
|
angular.module('warehost')
|
|
.controller('InvitesCtrl',function(session,config,alert,NgTableParams,$scope,$http){
|
|
$scope.tableParams = new NgTableParams({
|
|
sorting: { 'invited.username': 'asc' },
|
|
total: 0,
|
|
count: config.table.count
|
|
}, { dataset: [] });
|
|
$scope.list = {};
|
|
alert.set({});
|
|
$http.get(config.api+'/invite').then(function(res){
|
|
session.set(res);
|
|
$scope.tableParams.settings({dataset: angular.copy(res.data.data),total: (res.data.data).length});
|
|
});
|
|
});
|