title: Not able to get image as json response using angularJS?
body: <p>I am getting image in json response form restful api and I have to use that image in html using angularjs.</p>
  
  <p>I dont know how can I use that image using angularJs</p>
  
  <p>If I am trying like that <strong>"http:/api/image/id"</strong> where id is <strong>"userID"</strong>. But when I write the code in angularjs I didnt get any response.I tried to debug code by using breakpoints and but it didn't go inside the function </p>
  
  <p><strong>JS Code</strong></p>
  
  <pre><code>QAApp.controller('imgCtrl', function ($scope, $http) {
    $scope.image = function (id) {
         var request = $http({
                            method: 'GET', 
                            url: server + 'api/image/' + id,
                          });
              request.success(function(data, status, headers, config) {
                console.log(data);
  
              });
            }
        }); 
  </code></pre>
  
  <p><strong>HTML Code</strong></p>
  
  <pre><code>&lt;div class="artst-pic pull-left" ng-controller="imgCtrl"&gt;
        &lt;img ng-show = "{{image(q.userID)}}" alt="" class="img-responsive" /&gt;K
  &lt;/div&gt;
  </code></pre>
  
  <p>Please tell me how can I use this.</p>