directive ngCut

在cut事件上指定定制行为。(ctrl+x)时触发-(剪切)时触发

例子:

index.html

<!DOCTYPE html>
<html ng-app="bindExample">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body ng-controller="ExampleController">
<input ng-cut="cut=true" ng-model="value">
cut: {{cut}}
<script src="framework/angular.js"></script>
<script src="js/bbb.js"></script>
</body>
</html>

script.js

angular.module('bindExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
        $scope.cut = false;
        $scope.value = "cut me";
    }]);
原文地址:https://www.cnblogs.com/ms-grf/p/7001478.html