how to get clipboard data in angular JS

后端 未结 5 2007
温柔的废话
温柔的废话 2020-12-10 13:14

I was actually looking to get the content of clipboard using angular JS to simulate a copy paste thing.

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 13:34

    here's a concise version I use -

    function copyToClipboard(data) {
        angular.element('