After creating a function that I've used multiple times in the past, I passed in $event via the controller as well as in the element's function call in the HTML for an ng-change event. However, I'm getting an error saying that $event is undefined in all browsers.
Here's how it looks in the code:
<select data-ng-change="determineAbsenceInputs($event)"
In the JavaScript file:
$scope.determineAbsenceInputs = function($event) {
console.log($event.target);
}
I've created similar functions before and they worked fine, allowing me to reference the event target and its attributes. It's puzzling why this particular function is causing issues. You can also view the issue on JSFiddle here: http://jsfiddle.net/ADukg/16190/.