Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Pass Parameter value under event in angular JS:-

We can pass param directly under the calling function which will be received by called function:-

<!DOCTYPE html>
    <script src=""> </script>
<div ng-app="myApp" ng-controller="myCtrl" >
<input type="text" ng-model="num" />

<input type="button" value="sq" ng-click="fun('sq')">
<input type="button" value="cube" ng-click="fun('cb')">


<script type="text/javascript">
          $scope.res= eval($scope.num)*eval($scope.num);
          $scope.res= eval($scope.num)*eval($scope.num)* eval($scope.num);





Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post