I'm creating an online agenda that pulls events from a google calendar, and it is currently pulling the start date of only the first instance of a repeating event. Is there anything I can do with the api and javascript to show the actual date of each event, not just the first instance?
My HTML:
<div ng-controller="calCtrl">
<div ng-repeat="event in events">
<div class="event-row">
<span id="eventTitle">{{ event.summary }}</span>
<span id="eventDate">{{ event.start.date | date:'EEE M/d/yyyy' }}{{ event.start.dateTime | date:'EEE M/d/yyyy' }}</span> //
<span id="eventTime">{{event.start.dateTime | date:'H:mm' }}</span>
<span id="eventLocation">{{event.location}}</span>
</div>
</div>
My JS so far:
var app = angular.module('eventApp', []);
app.factory('calendarServ', ['$http', function($http) {
var today = (new Date()).toISOString();
var APIKey = "___________";
var url = "https://www.googleapis.com/calendar/v3/calendars/–––––––/events?maxResults=30&&timeMin=" + today + "&key=" + APIKey;
return $http.get(url)
.success(function(data) {
return data;
})
.error(function(err) {
return err;
});
}]);
app.controller('calCtrl', ["$scope", "$http", "calendarServ", function($scope, $http, calendarServ) {
$scope.events;
calendarServ.success(function(data) {
$scope.events = data.items;
});
}]);