参考:https://segmentfault.com/a/1190000009704111
1、安装
npm install ngx-clipboard
2、引入当前文件的module.ts

3、component.html使用
<button class="btn btn-primary btn-lg" ngxClipboard [cbContent]="'复制内容" (cbOnSuccess)="复制成功后操作">保存</button>
参考:https://segmentfault.com/a/1190000009704111
1、安装
npm install ngx-clipboard
2、引入当前文件的module.ts
3、component.html使用
<button class="btn btn-primary btn-lg" ngxClipboard [cbContent]="'复制内容" (cbOnSuccess)="复制成功后操作">保存</button>
本文标题:angular4 复制到剪贴板
本文链接:https://www.haomeiwen.com/subject/fytkwftx.html
网友评论