title: Angular UI Bootstrap Datepicker - add custom function to template
body: <p>I want to specify color of Angular UI date cells, by adding color for cells, so I override default template with something like this: </p>
  
  <pre><code>&lt;!-- things from pasted default template, here I change something --&gt;
  &lt;!-- btn-danger instead btn-info for clicked date, test if I can change anything--&gt;
  &lt;!-- call to function from my own controller--&gt;
  &lt;button type="button" style="width:100%;" class="btn btn-default btn-sm"
      ng-class="{'btn-danger': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)"
      ng-disabled="dt.disabled" tabindex="-1"&gt;
      &lt;span ng-class="{'text-muted': dt.secondary, 'text-info': dt.current,
      'text-success': hasEventsCreatedByUser(dt)}"&gt;
      {{dt.label}}&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>And that is (at the moment) function in my <code>testController</code></p>
  
  <pre><code>$scope.hasEventsCreatedByUser = function(date){
              return true;
  };
  </code></pre>
  
  <p>Change from <code>btn-info</code> to <code>btn-danger</code> was quite easy, it's only paste another class:) But I cannot call method from my controller here - is there any solution to enable calling function from my Controllers in Angular UI template or I have to override in some way default <code>DatepickerController</code>?</p>
  
  <p>More detailed description: user can create an event with specified date. The idea is to, for example, make cell with date in which he created green</p>
  
  <p><strong>Mock solution found</strong>:</p>
  
  <p>I use "miniController" which I append only on button:</p>
  
  <pre><code>&lt;button ng-controller="miniController" type="button" style="width:100%;" class="btn btn-default btn-sm" .....
  </code></pre>
  
  <p>But I know this is only mock not a solution - if anybody has an idea how to figure it out, I will be very happy if decides to help me - thank you in advance!</p>