Share.. Ask.. Learn..
Pages
Home
AngularJs Keywords
AngularJS
AngularJS Question & Answer
Angular 2
About Us
Contact Us
Tuesday, 3 November 2015
ng-copy
What is ng-copy:
ng-copy used to perform any task when copy something form where ng-copy mentioned.
Description of ng-copy:
ng-copy has 0 priority . We can perform any particulate task when we copy something form any Browser window ,input,select,textarea and anchor.
Syntax of ng-copy:
<
elementname
ng-copy
="myfun()"></
elementname
>
OR
<
input
ng-copy
="myfun()"/>
How to Use ng-copy/ng-copy Example::
AngularJs Example 1:
<
div
>
Angularjs Example of ng-copy
<
br
/>
<
div
ng-init
="myexpression='Angularjs Example of ng-copy'">
<
input
type
="text"
ng-copy
="myfun()"
/>
This is angularjs example of ng-copy
</
div
>
</
div
>
o/p
: Angularjs Example of ng-copy
This is angularjs example of ng-copy
AngularJs Example 2:
<
div
ng-app
="webapp">
<
div
ng-controller
="angularjsexampleCtlr">
<
div
>
Angularjs Example of ng-copy
<
br
/>
<
div
ng-init
="myexpression='Angularjs Example of ng-copy'">
Before copy :
{{
myexpression
}}
<
input
type
="text"
ng-copy
="myfun()"
/>
After copy :
{{
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-copy after copy
;
}
});
</
script
>
o/p
: Before copy : Angularjs Example of ng-copy.
After copy :This is angularjs example of ng-copy after copy .
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment