I am currently working with angularJS and have multiple <select>
elements on my webpage, each with its own ng-change
function. Here is an example:
<select id="hairColorComponent" ng-model="hairColor"
ng-options="option.name for option in hairColorData"
ng-change="updateUserData()">
I would like to find out which specific DOM element was updated within the updateUserData
function without needing to manually specify it as a parameter for every ng-change
attribute.
Is there an event object
or some other method that I can utilize within the scope of the updateUserData
function?
Perhaps something along the lines of
ng-change="updateUserData(caller)"