SkillAgentSearch skills...

NgClipboard

Simple module that allows to make an HTML tag copyable on click or send a custom string to clipboard. Works on mobile!

Install / Use

/learn @nico-val/NgClipboard
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ngClipboard

AngularJS module to copy HTML tags on click, and send custom values to clipboard. No need for any Flash complements. It works on mobile devices.

##Installation

  1. Download the latest release from here.

  2. Include ngClipboard.js in your HTML.

    <script src="ngClipboard.js"></script>
    
  3. Inject the module in your app.

    angular.module('myApp',['ngClipboard']);
    

##Demo http://plnkr.co/edit/TMGDUH5IG4GazpBvT2rQ

##Usage

###ng-copyable directive Add a "ng-copyable" attribute to any html tag to make it copyable on click.

<div ng-copyable>Click to copy this text!</div>

###ngClipboard.toClipboard() factory

  1. Inject ngClipboard in your controller

    angular.controller('myController',['ngClipboard',function(ngClipboard){
      /* ... */
    }]);
    
  2. Then send values to clipboard using

ngClipboard.toClipboard(value);

Related Skills

View on GitHub
GitHub Stars25
CategoryDevelopment
Updated4y ago
Forks8

Languages

JavaScript

Security Score

60/100

Audited on Jan 9, 2022

No findings