Angularjs Examples

AJS Examples


AngularJS ng-cut Directive

The AngularJS ng-cut directive is used to specify custom behavior on cut event.

Syntax

<input ng-cut="cut=true" ng-init="cut=false; value='cut text from here'" 
ng-model="value"> 

AngularJS ng-cut Directive Example

<!DOCTYPE html>      
<html>      
<head> <!-- www.techstrikers.com -->      
<title>ngCut Test Sample</title>   
      
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>      
  
</head>      
<body style="background-color:#DDE4E9;" ng-app="">      
  <fieldset style="background-color:#DDE4E9;">        
    <legend>AngulerJS ngCut Example</legend>  
  
<input ng-cut="cut=true" ng-init="cut=false; value='cut text from here'" 
ng-model="value">
<p style="font-family:Arial;color:red;background:steelblue;padding:3px;width:350px;"     
        ng-show='cut'>Text cut</p>  
      
 </fieldset>       
</body>      
</html>   
See live Example