Angularjs base ng-copy Instruction Instance code _ANGULARJS

Source: Internet
Author: User

Angularjs ng-copy Instruction

Angularjs instance

Executes an expression when the text of the input box is copied:

<! DOCTYPE html>
 
 

Note: The value of the variable "count" in the instance automatically increases by 1 when the text of the input box is copied.

Definitions and usage

The ng-copy directive is used to tell angularjs what to do when HTML element text is copied.

The ng-copy directive does not overwrite the original oncopy event of the element, and the ng-copy expression and the original Oncopy event are executed when the event is triggered.

Grammar

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

All HTML elements are supported.

Parameter values

value Description
Expression An expression that is executed when the element text is copied.

The above is the ng-copy instruction of the basic data collation, learning Angularjs friend under the reference.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.