mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-07 21:21:49 +02:00
First Commit
This commit is contained in:
commit
2630cc237a
527 changed files with 104273 additions and 0 deletions
18
public/js/controllers/event.controller.js
Normal file
18
public/js/controllers/event.controller.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
angular.module('rallly')
|
||||
.controller('EventCtrl', function($scope, $http, $state, Event, Participant){
|
||||
|
||||
var id = $state.params.id;
|
||||
$scope.event = Event.get({id:id});
|
||||
$scope.deleteParticipant = function(pid){
|
||||
Participant.remove({ id : id , pid : pid }, function(event){
|
||||
$scope.event = event;
|
||||
});
|
||||
}
|
||||
$scope.save = function(participant){
|
||||
var participant = new Participant(participant);
|
||||
participant.$save({id:id}, function(event){
|
||||
$scope.event = event;
|
||||
$scope.participant = {};
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue