1.0.7 • Published 7 years ago
pb_json_menu v1.0.7
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 ?
Manual Download
Download the from here
Bower
bower install ng-copy-text
CDN
ng-clip is available at cdnjs
Usage
Add ng-copy-text.js to your main file (index.html)
<script type="text/javascript" src="bower_components/ng-copy-text/dist/ng-copy-text.js"></script>
Set
ngCopyText
as a dependency in your modulevar 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
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