title: Aframe state component - rendering assets
body: <p>I'm wondering how to manage assets in aframe state component</p>
  
  <p>In the example of a list</p>
  
  <pre><code>&lt;a-entity bind-for="for: shoppingItem; in: shoppingList; key: name"&gt;
    &lt;template&gt;
      &lt;a-entity bind__text="value: shoppingItem.name"
                data-amount="{{ shoppingItem.amount }}"&gt;&lt;/a-entity&gt;
    &lt;/template&gt;
  &lt;/a-entity&gt;
  </code></pre>
  
  <p>I assume you'd use something like this</p>
  
  <pre><code>      &lt;a-assets bind-for="for: asset; in: assets; key: id"&gt;
          &lt;template&gt;
              &lt;a-asset-item response-type="arraybuffer" bind__src="asset.src" bind__id="value: asset.id" /&gt;
          &lt;/template&gt;
        &lt;/a-assets&gt;
  </code></pre>
  
  <p>However that would only work for videos.</p>
  
  <p>If I set my inital state as such</p>
  
  <pre><code>initialState: {
    hotspots: [],
    assets: [{src: 'https://example.com/assets/logo.png' , id: 'logo'}]
  },
  </code></pre>
  
  <p>And plan on populating those asset arrays with the src and id of each asset, then SRC is not making it to the entity with the error:</p>
  
  <blockquote>
    <p>Cannot read property 'match' of null
        at FileLoader.load (aframe-master.js:28912)
        at HTMLElement.value (aframe-master.js:57743)
        at HTMLElement.wrappedMethod (aframe-master.js:59621)</p>
  </blockquote>
  
  <p>I tried <code>&lt;a-asset-item response-type="arraybuffer" src="{{asset.id}}" bind__src="value: asset.src" bind__id="value: asset.id" /&gt;</code></p>
  
  <p>And that doesn't work either. </p>