title: How to use Puppeteer in an Angular application
body: <p>My question is simple but I don't understand if it's possible and, in this case, how it's possible.</p>
  <p>I would like to use the <a href="https://developers.google.com/web/tools/puppeteer/" rel="nofollow noreferrer"><code>puppeteer</code></a> library in an Angular application using the <a href="https://www.npmjs.com/package/puppeteer" rel="nofollow noreferrer">npm package</a>, but I don't understand how I can use it.</p>
  <p>For example I just want to make this script :</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const puppeteer = require('puppeteer');
  
  (async () =&gt; {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    await page.goto('https://example.com');
    await page.screenshot({path: 'example.png'});
  
    await browser.close();
  })();</code></pre>
  </div>
  </div>
  </p>
  <p>In an Angular component, can somebody help me (it will be able me to understanding a lot of thing).</p>
  <p>Thanks in advance, sorry for my bad English, I'm French.</p>