title: Working with Ladda-buttons
body: <p>I have a ladda button as follows.</p>
  
  <pre><code>&lt;button class="btn btn-primary btn-xs ladda-button" 
  data-style="slide-left" data-size="xs" v-on:click="refreshPage()"&gt;Refresh&lt;/button&gt;
  </code></pre>
  
  <p><code>VueJs</code> is in charge of the triggering the <code>onClick</code> event. When the button is clicked the following function is evoked </p>
  
  <pre><code>    refreshPage: function() {
          that = this;
          Ladda.bind( '.ladda-button', {
              callback: function( instance ) {
                  instance.start();
                  console.log(this);
                  that.getProjectEvents();
                  that.getIgnoredEvents();
                  toastr.info('Refresh was done.');
                  instance.stop();
              }
          } );
  
      }
  </code></pre>
  
  <p>getProjectEvents code follows </p>
  
  <pre><code>    getProjectEvents: function() {
          this.$http.get('/project/exceptions/'+url(-1)).success(function(response) {
             this.$set('events', response);
          });
      },
  </code></pre>
  
  <p>getIgnoredEvents is as follows </p>
  
  <pre><code>    getIgnoredEvents : function() {
         this.$http.get('/exceptions/ignoredExceptions/'+ url(-1)).success(function(response) {
            this.$set('ignoredExceptions', response);
         }); 
      }, 
  </code></pre>
  
  <p><code>getProjectEvents</code> and <code>getIgnoredEvents</code> are both defined in the same JS file.  </p>
  
  <p><strong>Problem</strong></p>
  
  <p>When I click the button , the spinner is not getting displayed. However when I yank the code from the two methods(<code>getProjectEvents</code> and <code>getIgnoredEvents</code>) and put in the callback , everything starts to work. I am wondering why it does not get called when I am calling the functions!</p>
  
  <p><em>I also tried using the setTimeOut function (wondering if the refresh was happening too quickly) but it does not work (apparently because its asynchronous).</em></p>
  
  <p>Can you please let me know what I am doing wrong here? </p>
  
  <p>Thanks</p>