https://github.com/codehangar/ng-copy-text
https://github.com/codehangar/ng-copy-text
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codehangar/ng-copy-text
- Owner: codehangar
- License: mit
- Created: 2015-08-11T03:02:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-29T02:06:39.000Z (over 10 years ago)
- Last Synced: 2026-01-23T01:58:35.844Z (5 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ngCopyText - HTML5 (Non-Flash) Based Copy to clipboard using AngularJS
=======
[](https://travis-ci.org/codehangar/ng-copy-text)
A simple AngularJS directive that uses document.exec('copy') and updates the user's clipboard.
## How to get it ?
#### Manual Download
Download the from [here](https://github.com/codehangar/ng-copy-text/releases)
#### Bower
```
bower install ng-copy-text
```
#### CDN
ng-clip is available at [cdnjs](http://www.cdnjs.com/libraries/ng-copy-text)
## Usage
1. Add ng-copy-text.js to your main file (index.html)
```html
```
2. Set `ngCopyText` as a dependency in your module
```javascript
var myapp = angular.module('myapp', ['ngCopyText'])
```
3. Add copy-text directive to the wanted element, example:
```html
Text To Copy
```
4. In Unsupported Browsers, the text will be selected, allowing user's to [CMD+C] or [Ctrl+C] to copy
## Examples
You can check out this live example here: http://plnkr.co/XXXX
## Credits
This project was initially forked from the application template seed here
[https://github.com/refactorthis/angular-component-seed.git](https://github.com/refactorthis/angular-component-seed.git)