- updated styles
- added edit functionality
This commit is contained in:
Luke Vella 2015-01-12 12:09:00 +01:00
parent 2630cc237a
commit b72dfc474e
21 changed files with 136 additions and 52 deletions

View file

@ -1,9 +1,6 @@
angular.module('rallly')
.controller('NewEventCtrl', function($scope, $http, $state){
$scope.event = {};
$scope.templates = {
modal : 'templates/modal.html'
};
$scope.submit = function(){
$http.post('/api/event', $scope.event)
.success(function(event, status, headers, config){
@ -17,7 +14,6 @@ angular.module('rallly')
})
.error(function(data, status, headers, config){
$scope.errors = data.errors;
console.log(data.errors);
})
}
$scope.clearDates = null
@ -51,15 +47,4 @@ angular.module('rallly')
};
}
}
})
.directive('rallly-error', function(){
return {
restrict : 'A',
scope: {
'message': '='
},
controller : function($scope){
console.log($scope.message);
}
}
});