asafdav / ng-clip

Copy to clipboard using AngularJS
MIT License
260 stars 71 forks source link

how to copy current dom data? #95

Open m2maomao opened 7 years ago

m2maomao commented 7 years ago

now the demo: <input ng-model="copy1"> <a clip-copy="copy1">copy</a> this demo is run,but I want put the value in <a> ,for example like this: <a clip-copy="copy1" data="something i want copy">copy</a> how can I copy when the value in copy button?

I tryed by this: <a clip-copy="copy1" ng-model="copy1='something I want copy'"></a> It's run,but I donn't know if it's the best way to get the value.thks;