ng-copy
Handler for copy event
Description
The ng-copy directive allows you to specify custom behavior when an element is
copied.
Parameters
ng-copy
Type: Expression
Description: Expression to evaluate upon copy event. ClipboardEvent object is available as
$event.Example:
<div contenteditable="true" ng-copy="$ctrl.greet($event)">Content</div>
Demo
<section ng-app>
<div class="border p-2" ng-copy="copied = true" contenteditable="true">
Copy text from this box via Ctrl-C
</div>
{{ copied }}
</section>
Copy text from this box via Ctrl-C
{{ copied }}Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.