angular-clipboard

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

angular-clipboard

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

Install using npm or bower:

angular-clipboard has no other dependencies than Angular itself.

Usage

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 about 2 years ago.