angular-copy
v0.2.0
Published
Copy to Clipboard functionality for Angular.
Downloads
4
Readme
angular-copy
Copy to Clipboard functionality for Angular.
npm install angular-copy --save
Add to your app.module.ts file.
import { AngularCopyModule } from 'angular-copy';
Add to your html.
<copy-button [value]="'value to be copied!'"></copy-button>
<copy-span [value]="'value to be copied!'"></copy-span>
Other options,
<copy-*****
[value]="string" -- required -- value to be copied to clipboard
[text]="string" -- default: 'Copy To Clipboard'
[css]="string" -- default: '' -- add css classes (bootstrap, font-awesome, etc)
[updateText]="boolean" -- default: false -- will change the text to "Copied!" for 1sec
(callback)="callback(boolean)" -- can be used for notification, return true
></copy-*****>