Skip to content

Commit 6a2366c

Browse files
committed
Merge branch 'master' of github.com:asafdav/ng-clip
2 parents fba53e4 + e05b837 commit 6a2366c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
ng-clip
1+
ngClip - Copy to clipboard using AngularJS
22
=======
33

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/

0 commit comments

Comments
 (0)