title: Angularjs $http.get method not working
body: <p>HI i have a micro service running on port 8501. </p>
  
  <pre><code>@RestController
  @RequestMapping("/feeds")
  public class FeedsController {
  
      @RequestMapping(method = GET)
      ResponseEntity&lt;?&gt; findAllFeeds() {
          return new ResponseEntity&lt;String&gt;("Hello", OK);
      }
  
  
  }
  </code></pre>
  
  <p>when i add url <code>http://localhost:8501/feeds</code>, browser displays "Hello". Now i am trying to access this through angularjs get call</p>
  
  <p>in my AngularJs my code is </p>
  
  <pre><code>'use strict';
  
  var app = angular.module('commentsjsApp');
  app.controller('MainCtrl', function ($scope,$http) {
  
      $http.jsonp('http://localhost:8501/feeds').success(function(data, status, headers, config){
      console.debug("Data : "+data+ "Status");
  }).error(function(){
      console.debug("error");
  });
  </code></pre>
  
  <p>EDIT : 
  In Network tab (firebug) i can see the GET with 200 status and response is "Hello". Why i am getting the error in console then? Can any one kindly help me.</p>
  
  <p>and when i run this angularjs app. the following output on console as shown in image</p>
  
  <p><img src="https://i.stack.imgur.com/NnuXS.jpg" alt="enter image description here"></p>