ng-clip

WebJar for ng-clip

Лицензия

Лицензия

MIT
Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

ng-clip
Последняя версия

Последняя версия

0.2.6
Дата

Дата

Тип

Тип

jar
Описание

Описание

ng-clip
WebJar for ng-clip
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/asafdav/ng-clip

Скачать ng-clip

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/ng-clip/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>ng-clip</artifactId>
    <version>0.2.6</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/ng-clip/
implementation 'org.webjars.bower:ng-clip:0.2.6'
// https://jarcasting.com/artifacts/org.webjars.bower/ng-clip/
implementation ("org.webjars.bower:ng-clip:0.2.6")
'org.webjars.bower:ng-clip:jar:0.2.6'
<dependency org="org.webjars.bower" name="ng-clip" rev="0.2.6">
  <artifact name="ng-clip" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='ng-clip', version='0.2.6')
)
libraryDependencies += "org.webjars.bower" % "ng-clip" % "0.2.6"
[org.webjars.bower/ng-clip "0.2.6"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.bower : angular jar [1.0.4,)
org.webjars.bower : zeroclipboard jar [2.2.0,2.3)

Модули Проекта

Данный проект не имеет модулей.

ngClip - Copy to clipboard using AngularJS

An AngularJS simple directive that uses ZeroClipboard and updates the user's clipboard.

How to get it ?

Manual Download

Download the from here

Bower

bower install zeroclipboard ng-clip

Npm

npm install zeroclipboard ng-clip

CDN

ng-clip is available at cdnjs

Usage

  1. Add ng-clip.js and ZeroClipboard.js to your main file (index.html)

  2. Update the .swf path location using ngClipProvider

  .config(['ngClipProvider', function(ngClipProvider) {
    ngClipProvider.setPath("bower_components/zeroclipboard/dist/ZeroClipboard.swf");
  }]);
  1. Set ngClipboard as a dependency in your module
var myapp = angular.module('myapp', ['ngClipboard'])
  1. Add clip-copy directive to the wanted element, example:
<a href="" clip-copy="getTextToCopy()" clip-click="doSomething()">Copy</a>
  1. You can optionally override zeroclipboard config parameters using ngClipProvider
    ngClipProvider.setConfig({
      zIndex: 50
    });
  1. You can optionally specify the MIME type by providing using the clip-copy-mime-type attribute:
<a href="" clip-click="getHtmlToCopy()" clip-copy-mime-type="text/html">Copy HTML</a>
  1. You can also optionally provide a fallback function that gets called if flash is unavailable:
<a href="" clip-click-fallback="fallback(copy)" clip-copy="getTextToCopy()" clip-click="doSomething()">Copy</a>

If the fallback function is defined to accept an argument named copy, that argument will be populated with the text to copy.

  1. set auto-hide-on-no-flash = true, it is used to hide button copy when browser flash is none, default auto-hide-on-no-flash = false, example:
<a href="" auto-hide-on-no-flash="true" clip-copy="getTextToCopy()" clip-click="doSomething()">Copy</a>

Examples

You can check out this live example here: http://plnkr.co/xwV5Yn see the examples folder for more

Bitdeli Badge

Версии библиотеки

Версия
0.2.6