Skip to content

Instantly share code, notes, and snippets.

Created June 12, 2014 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/35636e7c020d50aeab18 to your computer and use it in GitHub Desktop.
Save anonymous/35636e7c020d50aeab18 to your computer and use it in GitHub Desktop.
A Pen by A Non Ymous.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js"></script>
<head>
<body ng-app>
<input type="text" ng-init="vikas='vikas kumar'" ng-model="vikas" ng-blur="vikas='chaturvedi'">
<input type="text" ng-init="vikas='vikas kumar'" ng-model="vikas" ng-blur="alert('vik');">
</body>
</html>
@mermonkey
Copy link

hmmm... alert never fires for me....

@bengtweisse
Copy link

replace alert('vik'); with vikas='blurred and you will see it.

alerts and console.log does not work there ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment