From 0abcdc9b6cfdb1072c4b53021e9db23ddbf7633a Mon Sep 17 00:00:00 2001 From: patrioticcow Date: Sun, 27 Jul 2014 02:17:10 -0700 Subject: [PATCH] adding the calendars variable google will return promises from the api calls --- controllers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers.js b/controllers.js index ee6a84e..1e510df 100644 --- a/controllers.js +++ b/controllers.js @@ -23,7 +23,9 @@ angular.module('demo', ["googleApi"]) } $scope.loadCalendars = function() { - $scope.calendars = googleCalendar.listCalendars(); + $googleCalendar.listCalendars().then(function(calendars){ + $scope.calendars = calendars; + }); } }]);