VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/angularjs-ng-cut-directive/

⇱ AngularJS ng-cut Directive - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AngularJS ng-cut Directive

Last Updated : 8 Aug, 2022

The ng-cut Directive in AngularJS is used to specify the custom behavior functions when the text in input fields is cut. It can be used when we want to call a function that will be triggered when the text is cut from the input field. It is supported by all input elements.

Syntax:

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

Parameter:

  • expression: It specifies what to do when the input is cut. 

Example 1: This example uses the ng-cut Directive to display a message when cutting the input text element. 

Output:

👁 Image
 

Example 2: This example implements the ng-cut Directive to display the number of times the message cuts from the input text element. 

Output:

👁 Image
 
Comment

Explore