Latest web development tutorials

AngularJS ng-copy instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS examples

When executing the expression input box text to be copied:

<Input ng-copy = "count = count + 1" ng-init = "count = 0" value = "Copy this text" />

try it"

Definition and Usage

ng-copy command is used to tell the operator AngularJS HTML element when text is copied to execute.

ng-copy command does not overwrite the original elements oncopy event, the event is triggered, ng-copyexpression oncopy the original event will be executed.


grammar

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

All HTML elements are supported.


Parameter Value

value description
expression Expression when performing element text to be copied.

AngularJS Reference Manual AngularJS Reference Manual