Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var email = "Awesome@example.com";
  2.  
  3. $scope.emailInfo = '';
  4.  
  5. //emailOnClick() is a ng-click on DOM.
  6.  
  7. $scope.emailOnClick = function() {
  8.  
  9. $scope.emailInfo = $('.option-clicked').text().toLowerCase();
  10.  
  11. email = $scope.emailInfo; //this will print "great@example.com"
  12.  
  13. console.log($scope.emailInfo); //this will print "great@example.com" as well.
  14.  
  15. }
  16.  
  17. console.log(email); // this will print "awesome@example.com"
  18.  
  19. console.log($scope.emailInfo); //this will print "awesome@example.com".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement