app.controller('SearchController', ['$http', function($http) {
  console.log('SearchController running');

  angular.module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
    .controller('DemoCtrl', function($scope) {

      angular.module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
  .controller('DemoCtrl', function($scope) {
    $scope.user = {
      city: 'Mountain View',

    };

    $scope.states = (
    'WY').split(' ').map(function(state) {
        return {abbrev: state};
      });
  })
  .config(function($mdThemingProvider) {


  self.newSearch = {first_name: null, last_name:null, email: null, company: null,
                    job_title:null, zip: null, race: null, sex: null, orientation: null,
                    birthday: null, school: null, degree: null, major: null, language: null};
    $mdThemingProvider.theme('docs-dark', 'default')
      .primaryPalette('yellow')
      .dark();

  });


  self.getMentors = function() {
    return $http({
          method: 'GET',
          url: '/mentors',
          headers: {
            newSearch: newSearch
          }
        })
        .then(function (response) {
          self.mentors = response.data;
          console.log(mentors);
        }),
        function(err){
          console.log("Error with search get request ", err);
        };

  }
/**
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be foundin the LICENSE file at http://material.angularjs.org/HEAD/license.
**/

@@ -106,140 +106,273 @@
 %0A%0A  
-angular.module('MyApp',%5B'ngMaterial', 'ngMessages', 'material.svgAssetsCache'%5D)%0A    .controller('DemoCtrl', function($scope) %7B%0A%0A    
+self.newSearch = %7Bfirst_name: null, last_name:null, email: null, company: null,%0A                    job_title:null, zip: null, race: null, sex: null, orientation: null,%0A                    birthday: null, school: null, degree: null, major: null, language: null%7D;%0A%0A%0A
   an
@@ -543,17 +543,16 @@
  View',%0A
-%0A
     %7D;%0A%0A
@@ -708,275 +708,8 @@
 ) %7B%0A
-%0A%0A  self.newSearch = %7Bfirst_name: null, last_name:null, email: null, company: null,%0A                    job_title:null, zip: null, race: null, sex: null, orientation: null,%0A                    birthday: null, school: null, degree: null, major: null, language: null%7D;%0A
     
@@ -1214,16 +1214,22 @@
  %7D;%0A%0A  %7D
+%0A%0A%7D%5D);
 %0A/**%0ACop

Fix bugs in search controller