Javatpoint Logo
Javatpoint Logo

AngularJS ng-copy Directive

The AngularJS ng-copy directive specifies the custom behavior of AngularJS when an HTML element is being copied. It doesn't override the element's original on copy event; both the ng-copy expression and the original on copy event will be executed.

It is supported by all HTML elements.

Syntax:

Parameter explanation:

expression: It specifies an expression that is executed when the text of an element is being copied.

Let's take an example to demonstrate the ng-copy directive.

See this example:

Test it Now

Example2:

Test it Now



Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA