ng-clipboard-antd
A wrapper directive for clipboard.js, and base on ng-zorro-antd.
The core function is ported from clipboard.js(@zenorocha) & ngx-clipboard(@maxisam), thanks.
Demo
1、Install
npm install ng-clipboard-antd --save
Import the NzClipboardModule
in to your projects.
;
2、Usage
nz-clipboard
Copy
Name | Type | Default | Remark |
---|---|---|---|
[nzTarget] |
HTMLInputElement NzInputComponent |
copy from a input or nz-input | |
[nzSuccessText] |
string |
复制成功 | text of the success |
[nzErrorText] |
string |
复制失败 | text of the error |
(nzSuccess) |
EventEmitter |
a success callback | |
(nzError) |
EventEmitter |
a error callback |
NzClipboardService
constructorprivate srv: NzClipboardService copy
Troubleshooting
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
License
The MIT License (see the LICENSE file for the full text)