here we used a $resource called Audiencia which retrieves the events from the server. we have to map the properties in the Audiencia objects to the Event object expected by the fullcalendar, nothing special.
Then, when a select option is changed we need to filter the events accordingly, so we need to add the select control and bind the event.

here the important part is the eventRender function that is called for each event and when it returns false, the event is not displayed, thus filtered.
In the example the object Audiencia contains an array of Juez and if the selected Juez matches any of the Juez in the audiencia it is shown, otherwise it is not. We used the reduce function which takes an array and produce a single value, boolean in this case. Notice that we added an extra option ‘TODOS’ to display all events, if it gets selected $scope.filtro.juez is null and thus is not filtered.