AngularJS ng-copy
지시문
예시
입력 필드의 텍스트를 복사할 때 표현식을 실행합니다.
<input ng-copy="count = count + 1" ng-init="count=0" value="Copy this text"
/>
정의 및 사용
이 ng-copy
지시문은 AngularJS가 HTML 요소를 복사할 때 무엇을 해야 하는지 알려줍니다.
AngularJS 의 ng-copy
지시문은 요소의 원래 oncopy 이벤트를 재정의하지 않으며 ng-copy
표현식과 원래 oncopy 이벤트가 모두 실행됩니다.
통사론
<element ng-copy="expression"></element>
모든 HTML 요소에서 지원됩니다.
매개변수 값
Value | Description |
---|---|
expression | An expression to execute when the text of an element is being copied. |