JSFiddle - React, Tailwind, and code Playground

by Abhishek Sinha

HTML

<div ng-app="changeExample" ng-controller="ExampleController">
  <input type="text" ng-model="confirmed" ng-change="change(this)" id="ng-change-example1" />
 </div>

JavaScript

angular.module('changeExample', [])
    .controller('ExampleController', ['$scope','$http', 
    function($scope,$http) {        
      $scope.counter = 0;
      $scope.change = function(val) {
          debugger;
var params = {"input": val.confirmed ,"types":"(cities)","offset":"2","components":"in","key":"AIzaSyBgdbJ_NXwrgukBBmA4u7hEl99hma8O-jY" }
          $http.get("https://maps.googleapis.com/maps/api/place/autocomplete/json?"+params)
  .success(function (response) 
           {
               debugger;
               $scope.names = response.records;
           });
    
      };
 }]);