copy to clipboard in ember js code example
Example 1: copy to clipboard javascript dom
navigator.clipboard.writeText('Text');
Example 2: js copy to clipboard
function textToClipboard (text) {
var dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
}