AngularJS ng-cutDirective

AngularJS 参考手册AngularJS Reference Manual


AngularJS Example

Execute an expression when the text in the input box is cut:

<input ng-cut="count = count + 1" ng-init="count=0" value="Cut this text" />

Try it Yourself »

Definition and Usage

ng-cutThe ng-cut directive is used to tell AngularJS what to do when the text of an HTML element is cut.

ng-cutThis directive does not override the element's original oncut event. When the event is triggered,ng-cutthe expression and the original oncut event will both be executed.


Syntax

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

<a>, <input>, <select>, <textarea>, and window objects all support this directive.


Parameter Value

Value Description
expression The expression to execute when the element's text is cut.

AngularJS 参考手册AngularJS Reference Manual

Other Extensions