title: Initialize swiper
body: <p>I am trying to initialize my Swiper container after I have made some API calls. When I do this, however,I get the error:</p>
  
  <blockquote>
    <p>Property 'swiper' does not exist on type Element.</p>
  </blockquote>
  
  <p>Here is the link to the Swiper API: <a href="https://swiperjs.com/api/" rel="nofollow noreferrer">Swiperjs</a></p>
  
  <pre class="lang-js prettyprint-override"><code>ngOnInit() {
    this.spinner.show().then( async () =&gt; {
      this.data.currentProgress.subscribe(progress =&gt; this.progress = progress);
      await this.eventService.fetchEvents();
      }).then(async () =&gt; {
        const mySwiper = document.querySelector('.swiper-container').swiper;
        mySwiper.init();
      }).then(() =&gt; {
        this.spinner.hide();
      });
  }
  </code></pre>