title: What is the equivalent code for navigator.clipboard.readText() in angular
body: <pre><code>navigator.clipboard.readText()
    .then(text =&gt; {
      // `text` contains the text read from the clipboard
    })
    .catch(err =&gt; {
      // maybe user didn't grant access to read from clipboard
      console.log('Something went wrong', err);
    });
  </code></pre>
  
  <p><a href="https://alligator.io/js/async-clipboard-api/" rel="nofollow noreferrer">above code is from</a></p>
  
  <p>I need to read from clipboard on button click in angular <br>
  How to do that ?</p>