angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

How do I attach sources from two sources? #470

Open GeorgeChackungal opened 7 years ago

GeorgeChackungal commented 7 years ago

I wanted to attach sources from google calander as well as my own array. vm.events1 = [{ googleCalendarId: 'en.indian#holiday@group.v.calendar.google.com' }]; & var events2 = [ [{ id: 1, title: 'All Day Event', start: new Date(y, m, 1), end: null }, { id: 2, title: 'Long Event', start: new Date(y, m, d - 5), end: new Date(y, m, d - 2) }]];

Any idea how to do this?

CurtisVayne commented 7 years ago

use the eventSources array: $scope.eventSources = [$scope.events1, $scope.events2];

in your case, the $scope is the vm. anyway, check the demo.

danielbattat commented 6 years ago

Hi @CurtisVayne Were you able to get the google to work? I get an error: https://jsfiddle.net/4os6z5gh/ Thanks, Dan