title: Why are flickity css not being loaded in Angular?
body: <p>So I am trying to incorporate <a href="https://flickity.metafizzy.co/" rel="nofollow noreferrer">flickity</a> carousel in my Angular app. I think technically it should working fine, the issue that stops it from making it work the way it should is that none of the css from <code>flickity.css</code> seems to be loading. I was hoping someone might have an idea why that might be the case. </p>
  
  <p>I added <code>flickity</code> to my app by running <code>npm install flickity</code>.</p>
  
  <p>Thereafter, in my <code>component</code>, i added <code>flickity</code> as such: </p>
  
  <pre><code>import * as flickity from 'flickity';
  </code></pre>
  
  <p>Next I initialised everthing: </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>  ngOnInit() {
      window.addEventListener("DOMContentLoaded", function() {
        this.carousel = document.querySelector('.container');
        console.log(this.carousel);
        this.flick = new flickity(this.carousel, {
          imagesLoaded: true,
          wrapAround: true
        });
  
        var imgs = this.carousel.querySelectorAll('.item img');
        console.log(imgs);
        var docStyle = document.documentElement.style;
        var transformProp = typeof docStyle.transform == 'string' ?
          'transform' : 'WebkitTransform';
  
        this.flick.on('scroll', function() {
          this.flick.slides.forEach(function(slide, i) {
            var img = imgs[i];
            var x = (slide.target + this.flick.x) * -1 / 3;
            img.style[transformProp] = 'translateX(' + x + 'px)';
          });
        });
      });
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Essentially all the <code>js</code> seems to be working fine but none of the inherent <code>flickity</code> is being rendered, meaning everything from the flickity viewport, buttons etc.. hence the whole thing won't working.</p>