Tuesday, 3 November 2015

ng-cut

What is ng-cut:ng-cut used to perform any task when cut something form where ng-cut mentioned...
Description of ng-cut:ng-cut has 0 priority . We can perform any particulate task when we cut something form any Browser window ,input,select,textarea and anchor.
Syntax of ng-cut:
<elementname  ng-cut="myfun()"></elementname>
    OR

    <input ng-cut="myfun()"/>
How to Use ng-cut/ng-cut Example::
AngularJs Example 1:
    <div>
        Angularjs Example of ng-cut
        <br />
        <div ng-init="myexpression='Angularjs Example of ng-cut'">
            <input type="text" ng-cut="myfun()" /> This is angularjs example of ng-cut
        </div>
    </div>
    o/p:   Angularjs Example of ng-cut
    This is angularjs example of ng-cut


    AngularJs Example 2:

    <div ng-app="webapp">
        <div ng-controller="angularjsexampleCtlr">
            <div>
                Angularjs Example of ng-cut
                <br />
                <div ng-init="myexpression='Angularjs Example of ng-cut'">
                    Before cut  : {{myexpression}}
                    <input type="text" ng-cut="myfun()" />
                    After cut  :{{myexpression}}
                </div>
            </div>
        </div>
    </div>
    <script>
        angular.module('webapp', []).controller('angularjsexampleCtlr', function ($scope, $http) {
            $scope.myfun = function () {
                $scoep.myexpression = 'This is angularjs example of ng-cut after cut;
            }
        });
    </script>

        o/p: Before cut : Angularjs Example of ng-cut.
                After cut  :This is angularjs example of ng-cut after cut .

No comments :

Post a comment