javascript - ng-click Angular JS issue -
javascript - ng-click Angular JS issue -
new angular js, trying access click event using ng-click.
html:
<button ng-click="selectnav($event)">click</button>
js:
angular.module('app').controller('ctrl', function(){ $scope.selectnav = function($event){ console.log($event); } });
on click of button, not giving value of $event. can 1 allow me know going wrong.
i've noticed didn't pass $scope
controller. seek prepare maybe
angular.module('app').controller('ctrl', function($scope){ $scope.selectnav = function($event){ console.log($event); } });
javascript jquery angularjs
Comments
Post a Comment