title: How to define own functions to call from fullcalendar events
body: <p>I'm using angular5 and fullcalendar.io and want to have code like this, where mySelectEvent(event) is a reusable function I have defined which will manipulate the fullcalendar and can be called from multiple fullcalendar callback events.</p>
  
  <pre><code>ngOnInit() {
      $('#calendar').fullCalendar({
  
        eventClick: function(event, jsEvent, view) {
          mySelectThisEvent(event);
          ...
        };
  
        eventResizeStart: function( event, jsEvent, ui, view ) { 
          mySelectThisEvent(event);
          ...
        };
  
        eventDargStart: function( event, jsEvent, ui, view ) { 
          mySelectThisEvent(event);
          ...
        };
      }
  
      function mySelectThisEvent(event) {
        &lt;for loop deselect old event&gt;
        &lt;select event
      }
  }
  </code></pre>
  
  <p>I have my full calendar working and doing all sorts of stuff so just asking where to put a funciton definition and how to call it from the fullcalendar callback events.</p>