From 8412764aea488efe9052eee89a55521c3f92e81f Mon Sep 17 00:00:00 2001 From: Janssen Wee Date: Fri, 27 Oct 2017 12:45:30 -0700 Subject: [PATCH] get eventSources from scope in getOptions method Allows for flexible assignment of eventSource within an Angular service or irective. --- src/calendar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calendar.js b/src/calendar.js index 7ac3056..ee90252 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -252,6 +252,10 @@ angular.module('ui.calendar', []) var fullCalendarConfig = controller.getFullCalendarConfig(calendarSettings, uiCalendarConfig); var localeFullCalendarConfig = controller.getLocaleConfig(fullCalendarConfig); angular.extend(localeFullCalendarConfig, fullCalendarConfig); + + //pull sources into options each time getOptions() is called. + sources = scope.eventSources; + options = { eventSources : sources };