Copy to clipboard with AngularJS directive, without using Flash.
0 people use it
Author: 876633?v=3 omichelsen
Submitted by: 8306720?v=3 samjetski


Build Status Test Coverage

Copy text to clipboard by clicking a button, without using Flash. This is using the new Selection API and Clipboard API available in the latest browsers.

Browser support: Chrome 43+, Firefox 41+, Opera 29+ and IE10+.

See the demo.


Install using npm or bower:

angular-clipboard has no other dependencies than Angular itself.


Require angular-clipboard as a dependency for your app:

Copy text from an input field by clicking a button:

You can supply a method to be called for the on-copied and on-error event. The on-error function will be called with the error object as argument err.

comments powered by Disqus
This page was last updated over 2 years ago.