AngularJS Built-in directives ngCopy


Example

The ngCopy directive specifies behavior to be run on a copy event.

Prevent a user from copying data

<p ng-copy="blockCopy($event)">This paragraph cannot be copied</p>

In the controller

$scope.blockCopy = function(event) {
    event.preventDefault();
    console.log("Copying won't work");
}