x
 
<!DOCTYPE html>
<html>
<script src="https://cdn.staticfile.net/angular.js/1.6.9/angular.min.js"></script>
<body ng-app="">
<input ng-paste="count = count + 1" ng-init="count=0" value="在此粘贴文本!" />
<p>文本已粘贴 {{count}} 次。</p>
<p>此例中,每次您向输入框粘贴文本时,变量“count”的值都会增加。</p>
</body>
</html>