ngCopyText - HTML5 (Non-Flash) Based Copy to clipboard using AngularJS
A simple AngularJS directive that uses document.exec('copy') and updates the user's clipboard.
How to get it ?
Download the from here
bower install ng-copy-text
ng-clip is available at cdnjs
- Add ng-copy-text.js to your main file (index.html)
ngCopyTextas a dependency in your module
var myapp = angular.module('myapp', ['ngCopyText'])
- Add copy-text directive to the wanted element, example:
<span copy-text>Text To Copy</span>
- In Unsupported Browsers, the text will be selected, allowing user's to [CMD+C] or [Ctrl+C] to copy
You can check out this live example here: http://plnkr.co/XXXX
This project was initially forked from the application template seed here https://github.com/refactorthis/angular-component-seed.git