Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var email = "Awesome@example.com";
- $scope.emailInfo = '';
- //emailOnClick() is a ng-click on DOM.
- $scope.emailOnClick = function() {
- $scope.emailInfo = $('.option-clicked').text().toLowerCase();
- email = $scope.emailInfo; //this will print "great@example.com"
- console.log($scope.emailInfo); //this will print "great@example.com" as well.
- }
- console.log(email); // this will print "awesome@example.com"
- console.log($scope.emailInfo); //this will print "awesome@example.com".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement