डाउनलोड पी.डी.एफ. ई-बुक्स
AJS - Directives ng-cut

ng-cut directive ये जब किसी HTML Element का content cut(ctrl+x) किया जाता है तब दिया हुआ expression execute करता है |


Syntax for ng-cut Directive in AngularJS

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

ng-cut Attribute's Parameters in AngularJS

expression : यहाँ पर expression दिया जाता है |


Example for ng-cut Directive using String in AngularJS

Source Code :
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body>

<div ng-app="">

<input ng-init="c = 0" ng-cut="c = c + 1" 
value="cut me cut me cut me cut me cut me " />

<p>Cut {{c}} times.</p> 

</div>

</body>
</html>
Output :

Cut {{c}} times.