How to capture the event of ng-change? How to capture the event of ng-change? angularjs angularjs

How to capture the event of ng-change?


ngMouse, ng-change does not provide an event object.

But my suggestion is to create another variable, assign $event to that, then pass it via ng-change.

<!DOCTYPE html><html><script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script><script type="text/javascript">    var app = angular.module("myApp", []);    app.controller("myCtrl", function($scope) {        $scope.alert = function ($event){            alert($event);        }    });</script><body ng-app="myApp" ng-controller="myCtrl"><div ng-init="names=['A', 'B', 'C']">    <select         class="form-control input-sm"         ng-click="event = $event"         ng-model="fda"         ng-change="alert(event)"         ng-options="value for value in names">    </select></div></body></html>