I have this code in native javascript and it works all right. it logs the textbox's current value
<script>
var boom = function(val) {
console.log(val);
};
</script>
<input type="text" onclick="boom(this.value)"/>
Then I want to do the same on AngularJS without using model. Here is the code:
$scope.boom = function(val) {
console.log(val);
};
<input type="text" ng-click="boom(this.value)"/>
But it always logs undefined!
Why?