1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| var myApp = angular.module('myApp.eventsview', ['ngRoute','ui.bootstrap']) ;
myApp.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/eventsview', {
templateUrl: 'index.html',
controller: 'EventsCtrlAjax'
});
}])
myApp.filter('dateFormat', function() {
return function(input) {
return input.substring(0,2) + "/" + input.substring(2,2) + "/" + input.substring(4,4);
}
})
myApp.controller('EventsCtrlAjax', ['$scope','$http' , function EventsCtrlAjax($scope, $http)
{
$http({
method : 'GET',
url : 'rest/event/events/'
}).success(function(data) {
console.log(data);
$scope.events = data;
});
}]); |
Partager