Select dropdown for ionic (ios) not working properly

I am using a “select” for my application. The behavior works fine with Android, you just select an item and it appears. However when you use the uipicker (which is what cordova is binding to), when you select a value, you have to tap outside the picker to get the value. I did some research about including something like this in your code:
$scope.selectedItem - function(){
alert(“In change function…”);
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}

I was not sure where to place the “cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);” code, so I just included it my controller to try to get it to fire on the on-change event from the drop-down

But also for some reason, I cannot get the “ng-change” to work either in my markup for for the select. It seems at if cannot receive the event. Click event’s on buttons are fine, but for my select… it’s just not working

You should include it in the run function in app.js.

$ionicPlatform.ready().then(function (){
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
}

ng-change example:-


Hope this helps

Thanks a lot for directing me to where to place the code. “THAT WORKED PERFECTLY”. I will add as a side note:
The behaviour is fixed when using the simulator and when deploying directly to the phone. But when using the ionic viewer app, the problem persists for some reason. But the most important thing is that it works on a normal install which means that when we push with our MDM tool (if we can ever get that to work). It should be ok … thanks a lot.

As far as the ng-click issue is concerned: All I am doing is including:
select ng-model=“input.InterviewerID” ng-change="selectedItem()"
in my select tag and then in my controller:

$scope.selectedItem - function(){
alert(“In change function…”);
}

nothing fancy… but for some reason the change event is not firing… wierd. The method works fine behind a mouse click (ng-click)