I have this code in my own javascript and it works fine. it registers the current value of the text field
<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 a model. Here is the code:
$scope.boom = function(val) { console.log(val); }; <input type="text" ng-click="boom(this.value)"/>
But he always registers undefined !
Why?
javascript function angularjs angularjs-scope
boi_echos
source share