title: initAutocomplete is not a function
body: <p>I am trying to use Place Autocomplete using AngularJS, and I receive:</p>
  
  <blockquote>
    <p>initAutocomplete is not a function</p>
  </blockquote>
  
  <p>I searched for similar problems, nothing helped to solve the problem.</p>
  
  <p>This is my code:</p>
  
  <pre><code>angular.module('myapp').controller('FirstCont', function ($scope, $http) {
  
  console.log("OUT");
  
  $scope.slctd_lng = 'SDF'
  $scope.slct_att = 'SD'
  
  window.initAutocomplete = function () {
  
      console.log("entered INIT");
  
      $scope.autocomplete = new google.maps.places.Autocomplete((document.getElementById('autocomplete')),{ types: ['geocode'] });
      $scope.autocomplete.addListener('place_changed', $scocpe.fillInAddress);
  }
  
  
  $scope.fillInAddress = function () {
      var place = $scope.autocomplete.getPlace();
  
  }
  
  
  $scope.geolocate = function() {
  
      if (navigator.geolocation) {
  
          navigator.geolocation.getCurrentPosition(function (position) {
  
              var geolocation = {
                  lat: position.coords.latitude,
                  lng: position.coords.longitude
              };
  
              var circle = new google.maps.Circle({
                  center: geolocation,
                  radius: position.coords.accuracy
              });
  
              $scope.autocomplete.setBounds(circle.getBounds());
          });
      }
  }});
  </code></pre>
  
  <p>And in my html file, I included:</p>
  
  <pre><code>    &lt;script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsMQs29oSTadTMQI8Qy-VudC4N-kPvCpU&amp;libraries=places&amp;callback=initAutocomplete"
          async defer&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Note: I can see: (in the html file)</p>
  
  <pre><code>$scope.slctd_lng = 'SDF'
  $scope.slct_att = 'SD'
  </code></pre>
  
  <p>but I did not receive 'OUT' in the console!!</p>
  
  <p>Thanks</p>