ion-google-place
ion-google-place copied to clipboard
Using with multiple input boxes
Thanks for the fastest directive, but I try to use it with 2 inputs it only picks up one. I removed self closing to proper closing, still no luck.
<ion-google-place placeholder="Your starting place" ng-model="from"></ion-google-place>
<ion-google-place placeholder="Your destination" ng-model="to"></ion-google-place>
I was having the same issue but added scope to the directive
function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $document) { return { require: '?ngModel', restrict: 'E', scope: {//add scope so that it is different for each input placeInfo: '=info' },
and then added the place info in the html
<div class="list list-inset"> <ion-google-place placeholder="Enter an address, Apt# and ZIP" info="start" id="startLocation" ng-model="mainCtrl.startLocation" /> </div> <div class="list list-inset"> <ion-google-place placeholder="Enter an address, Apt# and ZIP" info="end" id="endLocation" ng-model="mainCtrl.endLocation" /> </div>
Seems to be working for now
Please help me ,
I need use this script with 2 textbox in same page and save the result of coordinate in Firebase
thanks for ur help