title: Printing Flickr API Response to Console AngularJS
body: <p>I'm currently trying to make the API call work and want to see if it has managed to return the API data from the external source.</p>
  
  <ol>
  <li><p>How do I print an output to the console from the app.js file, so that in this case I can see whether the API call has been returned?/is there a better way of doing this that I'm missing?</p></li>
  <li><p>Should I be using $http or $resource?</p></li>
  </ol>
  
  <p>Current code:
  js/app.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var app = angular.module('imageViewer', ['ng', 'ngResource']);
  
    function AppGallery($scope, $http) {
      $http.jsonp('https://api.flickr.com/services/feeds/photos_public.gne?').success(function (data) {
        $scope.data = data;
        log(data);
      });
    }; </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="imageViewer"&gt;
  &lt;head&gt;
    &lt;title&gt;Photo Viewer&lt;/title&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.12/angular.js"&gt;&lt;/script&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.12/angular-resource.js"&gt;&lt;/script&gt;
    &lt;script src="js/app.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body ng-controller="AppGallery"&gt;
  
    {{data}}
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>