File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
- ng-clip
1
+ ngClip - Copy to clipboard using AngularJS
2
2
=======
3
3
4
- Copy to clipboard using AngularJS
4
+ An AngularJS simple directive that uses ZeroClipboard and updates the user's clipboard.
5
+
6
+
7
+ ## Usage
8
+ 1 . Add ng-clip.js to your main file (index.html)
9
+ 2 . Add //cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.1.7/ZeroClipboard.min.js to your main file (index.html)
10
+
11
+ 3 . Set ` ngClipboard ` as a dependency in your module
12
+ ``` javascript
13
+ var myapp = angular .module (' myapp' , [' ngClipboard' ])
14
+ ```
15
+
16
+ 4 . Add clip-copy directive to the wanted element, example:
17
+ ``` html
18
+ <a href =" " clip-copy =" getTextToCopy()" clip-click =" doSomething()" >Copy</a >
19
+ ```
20
+
21
+
22
+ ## Example
23
+ You can check out this live example here: http://jsfiddle.net/asafdav/8YQcz/6/
You can’t perform that action at this time.
0 commit comments