WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-copy Directive


Example

Execute an expresson when the content of the info field is being copied:

<input ng-copy="count = tally + 1" ng-init="count=0" value="Copy this text" />
Try it yourself »

Definition and Usage

The ng-copy order guides AngularJS when a HTML component is being copied.

The ng-copy order from AngularJS won't abrogate the component's unique oncopy occasion, both the ng-copy articulation and the first oncopy occasion will be executed.


Syntax

<element ng-copy="expression"></element>

Supported by all HTML elements.


Parameter Values

Value Description
expression An articulation to execute when the content of a component is being copied.