navigator.clipboard.readText()
.then(text => {
// `text` contains the text read from the clipboard
})
.catch(err => {
// maybe user didn't grant access to read from clipboard
console.log('Something went wrong', err);
});
I need to read from clipboard on button click in angular
How to do that ?
from this TypeScript How to paste data from clipboard using a button?, using hostListener