started user zone, post new event started, needs more implementation

This commit is contained in:
arnaucode
2017-02-21 22:39:52 +01:00
parent c9ee46d739
commit c41f5e016d
7 changed files with 127 additions and 1 deletions

21
www/js/newEvent.js Normal file
View File

@@ -0,0 +1,21 @@
angular.module('app.newEvent', ['pascalprecht.translate'])
.controller('NewEventCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) {
$scope.event={};
$scope.event.categories=[{name: "prova"}];
$scope.postEvent = function(){
$http({
url: urlapi + 'events',
method: "POST",
data: $scope.event
})
.then(function(data) {
window.location.href="#/app/events";
},
function(response) { // optional
// failed
console.log(response);
});
};
});