title: AngularJS How to inject dependencies when using controller-as syntax
body: <p>Following along with the controller-as feature mentioned in the docs, I'm reworking one of my controllers to match the syntax they suggested.  But I'm not sure how to inject the $http service into my search() function, and in a way that will be safe from minification?    </p>
  
  <pre><code>customer.RequestCtrl = function () {
                  this.person = {};
                  this.searching = false;
                  this.selectedInstitute = null;
                  this.query = null;
                  this.institutes = null;
  };
  
  customer.RequestCtrl.prototype.search = function() {
          this.searching = true;
          this.selectedInstitute = null;                 
          $http({method: 'GET', url: '/api/institutes', params: {q: this.query, max: 250}})
                  .success(function(data, status, headers, config) {
                          this.searching = false;
                          this.institutes = data;                                                                        
                  })
                  .error(function(data, status, headers, config) {
                          this.searching = false;
                          this.institutes = null;
                  });
  
  };
  </code></pre>