I'm trying to activate a click event when options are clicked instead of using the change event for specific reasons.
Below is my code snippet:
.directive('itemOptions', [
function() {
return {
restrict : 'A',
template : "<option ng-value='item_id'>{{item_name}}</option>",
replace : true,
link : function(scope, element, attrs) {
element.on('click', function() {
//get element value
});
}
}
}
])
The click event doesn't seem to be working...
Any assistance on making it work with just the click event and not the change event would be greatly appreciated. Thank you.