Last active
December 26, 2015 22:29
-
-
Save cyrusdavid/7223231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app=""> | |
<head> | |
<title>oncopy event example</title> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" /> | |
</head> | |
<body ng-controller="Main"> | |
<div ng-copy="log('Copy blocked!');">Try copying this text!</div> | |
<h3>Log</h3> | |
<pre ng-bind="dump"></pre> | |
<script src="http://code.angularjs.org/1.2.0-rc.3/angular.min.js"></script> | |
<script src="script.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Main($scope) { | |
$scope.dump = ""; | |
$scope.log = function(txt) { | |
$scope.dump += txt + "\n"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment