I write simple function in javascript
$scope.changeItem=function (o) {
console.log(o);
var value = ($scope.formInfo.name);
$scope.formInfo.positionId=value;
}
I want use it in ng-change directive like this
<select ng-options="position.name for position in positionlist" id="inputPosition" ng-model="formInfo.positionId" ng-change="changeItem(position)">
but my script is printing undefined value on console.