AngularJS ng-paste
Directive
AngularJS Example
Execute an expression when text is pasted:
Definition and Usage
The ng-paste directive is used to tell AngularJS what to do when text is pasted on an HTML element.
The ng-paste directive does not override the element's native onpaste event. When the event is triggered, both the ng-paste expression and the native onpaste event will be executed.
Syntax
The directive is supported by <input>, <select>, <textarea>, and other editable elements.
Parameter Values
Value | Description |
---|---|
expression | The expression to be executed when text is pasted into the element. |