title: GET call to REST API returns null
body: <p>I am trying to make a GET call to test a REST API but it keeps returning null, is there anything I am doing wrong:</p>
  
  <p><strong>Making the call in controller.js</strong></p>
  
  <pre><code>function ConsumerSearchCtrl($scope, BusinessCategoryService) {
  
      console.log(BusinessCategoryService);
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Rnx2y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rnx2y.png" alt="enter image description here"></a></p>
  
  <p><strong>127.0.0.1:8000/api/category/ works perfectly fine</strong></p>
  
  <p><a href="https://i.stack.imgur.com/KpKuX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KpKuX.png" alt="enter image description here"></a></p>
  
  <p><strong>Code in services.js for API</strong></p>
  
  <pre><code>/**
   *
   */
  function BusinessCategoryService(WenzeyAPI, $q) {
  
      var scope = this;
  
      scope.categories = categories;
  
      function categories() {
          var q = $q.defer();
          WenzeyAPI.get('http://127.0.0.1:8000/api/category/').then(function success (res) {
              q.resolve(res.data);
          }, function failure (err) {
              q.reject(err);
          })
          return q.promise;
  
      }
  
  }
  
  
  
  /**
   *
   */
  function WenzeyAPI() {
  
      var scope = this,
          ip = "http://127.0.0.1:8000";
  
      scope.get = get;
      scope.post = post;
  
      function get(url, data) {
  
          data = data || {};
  
          var req = {
              method: 'GET',
              url: url,
              data: data
          }
  
          var q = $q.defer();
          $http(req).then(function success(response) {
              q.resolve(response);
          }, function failure(err) {
              q.reject(err);
          });
          return q.promise;
      }
  
      function post(url, data) {
  
          data = data || {};
  
          var req = {
              method: 'POST',
              url: url,
              data: data
          }
  
          var q = $q.defer();
          $http(req).then(function success(response) {
              q.resolve(response);
          }, function failure(err) {
              q.reject(err);
          });
          return q.promise;
      }
  
  } 
  </code></pre>