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";
    }]);

 

posted @ 2017-06-13 15:24  发福大叔  阅读(154)  评论(0编辑  收藏  举报