How do I copy to clipboard in Angular 2 Typescript?

前端 未结 10 1069
-上瘾入骨i
-上瘾入骨i 2020-12-03 06:45

Is there a way to copy text in clipboard (multi-browser) in Angular2 Typescript framework?

I find only sources of using Javascript, e.g.

document.exe         


        
10条回答
  •  误落风尘
    2020-12-03 07:37

    Currently only for the most common APIs abstractions are implemented, mostly to be able to pass different implementations when run on the server (server side rendering (https://github.com/angular/universal) in inside a webworker where the API is not available.

    I'm pretty sure there is nothing yet for the clipboard API. There are plans to implement more wrappers though.

提交回复
热议问题