Angularjs ng-copy event example

Angular ng-cut, ng-copy, ng-paste Events Example

The example will help you understand and pay the on AngularJs ng-cut, ng-copy, ng-paste Events.

As an Example,

<!DOCTYPE html>
<html>
<head>
    <title>
        AngularJs ng-cut, ng-copy and ng-paste Events with Example
    </title>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
    <script type="text/javascript">
        var app = angular.module('myApp', []);
        app.controller('ngcopyCtrl', function ($scope) {
            $scope.cuttext = false;
            $scope.copytext = false;
            $scope.pasttext = false;
        });
    </script>
</head>
<body ng-app="myApp">
    <div ng-controller="ngcopyCtrl">
        <h2>As an Example for ng-cut, ng-copy and ng-paste Events in AngularJs</h2>
        <div>
            Copy the Text : <input type="text" ng-copy="copytext=true" value="Hi, You are Welcome!" />
            <span>The Text Is Copied :<b>{copytext }}</b></span>
            <hr />
        </div>
        <div>
            Cut the Text: <input type="text" ng-cut="cuttext=true" value="Hi, You are Welcome!" /> 
            <span>The Text Cut:<b>{cuttext }}</b></span>
            <hr /> 
        </div>
        <div>
            Paste the Text: <input type="text" ng-paste="pasttext=true" /> <br />
            <span>The Text Pasted:<b>{pasttext }}</b></span>
        </div>
    </div>
</body>
</html>


The live Result - output for play this example...
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

Angular ng-cut, ng-copy, ng-paste Events Example Angular ng-cut, ng-copy, ng-paste Events Example Reviewed by Anil Singh on 9:11 PM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^