2015-03-14 17:32:16 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/* Controllers */
|
2015-03-15 18:00:08 +01:00
|
|
|
var eventManControllers = angular.module('eventManControllers', []);
|
2015-03-14 17:32:16 +01:00
|
|
|
|
|
|
|
|
2015-03-15 18:00:08 +01:00
|
|
|
eventManControllers.controller('EventsListCtrl', ['$scope', '$http',
|
|
|
|
function ($scope, $http) {
|
|
|
|
$http.get('/events').success(function(data) {
|
|
|
|
$scope.events = data.events;
|
|
|
|
});
|
|
|
|
$scope.orderProp = 'begin-datetime';
|
|
|
|
}]
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
eventManControllers.controller('PersonsListCtrl', ['$scope', '$http',
|
2015-03-14 17:32:16 +01:00
|
|
|
function ($scope, $http) {
|
|
|
|
$http.get('/persons').success(function(data) {
|
|
|
|
$scope.persons = data.persons;
|
|
|
|
});
|
2015-03-15 18:00:08 +01:00
|
|
|
$scope.orderProp = 'name';
|
2015-03-14 17:32:16 +01:00
|
|
|
}]
|
|
|
|
);
|
|
|
|
|