×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Nilesh Yadav
Added: Jun 6, 2017 6:20 PM
Modified: Jun 6, 2017 7:18 PM
Views: 8
Tags: no tags
  1. <div id=#div1 ng-controller='emp'></div>
  2.  
  3. var btnClick = function() {
  4.         var $scope = angular.element($('#div1')).scope();
  5.  
  6.         $scope.s = Number($scope.a) + Number($scope.b);
  7.         $scope.$apply();
  8. }
  9.  
  10.