How to achieve this condition (ng-change="myFunction($event)") in AngularJS -
How to achieve this condition (ng-change="myFunction($event)") in AngularJS -
i have searched lot.
here links found, not solve problem.
passing arguments ngchange event phone call within directive
angularjs - why select drop downwards doesn't have $event on change
i have simple function defined in scope :
app.controller('myctrl', ['$scope', '$sce', function ($scope, $sce) { $scope.myfunction = function($event) { // stuff }; }]); and have html
<div ng-app="myapp" id="ngapp" ng-controller="myctrl" style="display:none"> <select class="form-control" name="selectedshowvariantsoption" ng-model="selectedshowvariantsoption" ng-options="option.name alternative in options" ng-change="myfunction($event)"></select> </div> i understand in angularjs can not pass $event ng-change in select. can on-click. still missing reason behind this? work around pass $event in ng-change ?
any suggestion appreciated.
angularjs
Comments
Post a Comment