I'm trying to grab an ID attribute from the input field on change.
myApp.controller('OnChangeController', ['$scope', function($scope) {
$scope.Change = function(e) {
//alert(e);
$scope.output = e.$attr;
}
}]);
<div ng-controller="OnChangeController">
<input ng-model="change" id="ChangeID1" ng-change="Change(this)"> {{ output }}
<input ng-model="change" id="ChangeID2" ng-change="Change(this)"> {{ output }}
</div>
How to grab the element's ID attribute?