AngularJSng-cut
ディレクティブ
例
入力フィールドのテキストが切り取られているときに式を実行します。
<input ng-cut="count = count + 1" ng-init="count=0" value="Cut this text"
/>
定義と使用法
このng-cut
ディレクティブは、HTML要素のテキストを切り取ったときに何をするかをAngularJSに指示します。
AngularJSからのng-cut
ディレクティブは、要素の元のoncutイベントをオーバーライドせず、ng-cut
式と元のoncutイベントの両方が実行されます。
構文
<element ng-cut="expression"></element>
<a>、<input>、<select>、<textarea>、およびウィンドウオブジェクトでサポートされています。
パラメータ値
Value | Description |
---|---|
expression | An expression to execute when the text of an element is being cut. |