title: Integrate Fancybox with AngularJs
body: <p>I am just getting started with angularjs and I would like to know if it is possible to integrate fancybox into an angularjs controller so that there is the default fancybox loading animation shown between ajax requests.</p>
  
  <p>Using the following code nothing happens and there are no console errors or messages.</p>
  
  <p>If some example code could be provided in case where there is an alternative solution using fancybox.</p>
  
  <p>Thanks.</p>
  
  <p>Note: I have defined a div with ng-view inside my index.html file.</p>
  
  <pre><code>$scope.search = function () {
  
      $.fancybox.showLoading();
  
      MyApp.query({
          query: $scope.query
      }, function (value, responseHeaders) {
  
          $.fancybox.hideLoading();
  
      });
  };
  </code></pre>