title: Get list of filenames in assets folder with Typescript
body: <p>How do I get all filenames in a folder using Typescript?
  It's for an angular 2 project.</p>
  
  <p>To be more specific, what I'm trying to do is set the images for a bootstrap carousel using images from my photos folder. Currently I'm doing this:</p>
  
  <pre><code>private _images: Image[] = []
  
  ngOnInit(): void {
      this._images = [
          { "title": "Slide 1", "url": "../photos/carousel/gg_slide 1.jpg" },
          { "title": "Slide 2", "url": "../photos/carousel/gg_slide 2.jpg" },
          { "title": "Slide 3", "url": "../photos/carousel/gg_slide 3.jpg" },
          { "title": "Slide 4", "url": "../photos/carousel/gg_slide 4.jpg" },
          { "title": "Slide 5", "url": "../photos/carousel/gg_slide 5.jpg" }
      ]
  }//ngOnInit 
  </code></pre>
  
  <p>Then using the the images array in the html file like this:</p>
  
  <pre><code>&lt;carousel&gt;
      &lt;slide *ngFor="let img of _images"&gt;
          &lt;img src="{{img.url}}" alt="{{img.title}}"&gt;
      &lt;/slide&gt;
  &lt;/carousel&gt;
  </code></pre>
  
  <p>I'd like to be able to just loop through whatever files are in the photos folder and add them to the images array.
  That way all I have to do to update the carousel is to change the photos in the photos folder.</p>