title: How to do http Crud operations in in $scope.myfunction() function?
body: <p><strong>I used meanjs generator to get this code</strong>  </p>
  
  <p>Mycode :- which Queries data from servercontroller .But I need to use Http request to get data from Api server. So i tried Code Like the Following with Http</p>
  
  <p><em>SuperherosController.js</em></p>
  
  <pre><code> angular.module('superheros').controller('SuperherosController', ['$scope','$http', '$stateParams', '$location', 'Authentication', 'Superheros',
      function($scope, $stateParams, $location, Authentication, Superheros,$http) {
          $scope.authentication = Authentication;
  // *Find a list of Superheros*
          $scope.find = function() {
     //Actual code with out Http request 
             // $scope.superheros =  Superheros.query();
     /// *The code i tried with  Http and injected dependencies* 
  </code></pre>
  
  <p>//Line 56:13
       $http.get('<a href="http://api.xxx.com/superheros" rel="nofollow">http://api.xxx.com/superheros</a>').success(function(data){
                      $scope.superheros = data;
                  });
               };
              }
          ]);</p>
  
  <p>**By Above modifications http.get making request but there is an error raising :-</p>
  
  <p>ERROR**</p>
  
  <blockquote>
    <p><strong><em>$http.get(...).success is not a function
    $scope.find@<a href="http://localhost:3000/modules/superheros/controllers/superheros.client.controller.js:56:13" rel="nofollow">http://localhost:3000/modules/superheros/controllers/superheros.client.controller.js:56:13</a></em></strong></p>
  </blockquote>
  
  <p><em>Error: [$resource:badcfg] Error in resource configuration. Expected response to contain an object but got an array</em>  with some referencing to angular domain </p>
  
  <p>Could You Please let me know whats wrong in My code .. or how can i fix this Problem ? 
  Thanks For Help In Advance!!</p>