title: AngularJS: Retrieving Videogular templates stored in $templateCache results 404 Error
body: <p>I currently develop an <strong>AngularJS</strong> <em>1.5.9</em> <strong>Single Page Application</strong> on my localhost with <strong>NodeJS</strong> running backend, where I use</p>
  <p><strong>Videogular</strong> framework. <a href="http://www.videogular.com/" rel="nofollow noreferrer">http://www.videogular.com/</a></p>
  <p>Everything is fine except inserting videogular object on my page. I strictly follow the given example: <a href="http://www.videogular.com/examples/simplest-videogular-player/" rel="nofollow noreferrer">http://www.videogular.com/examples/simplest-videogular-player/</a></p>
  <pre><code>&lt;videogular vg-theme=&quot;controller.config.theme.url&quot;&gt;
      &lt;vg-media vg-src=&quot;controller.config.sources&quot;
                vg-tracks=&quot;controller.config.tracks&quot;
                vg-native-controls=&quot;true&quot;&gt;
      &lt;/vg-media&gt;
  &lt;/videogular&gt;
  </code></pre>
  <p>But it results in AngularJS error:</p>
  <p><a href="https://i.stack.imgur.com/T9a54.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T9a54.png" alt="Error" /></a></p>
  <p><em>(<code>sessionId</code> in the request is the auth token not linked to current problem)</em></p>
  <p>I have found the following in <code>videogular.js</code> :</p>
  <pre><code>$templateCache.put(&quot;vg-templates/vg-media-video&quot;, &quot;&lt;video&gt;&lt;/video&gt;&quot;);
  $templateCache.put(&quot;vg-templates/vg-media-audio&quot;, &quot;&lt;audio&gt;&lt;/audio&gt;&quot;);
  </code></pre>
  <p>I have tried to store files locally, and the error disappeared</p>
  <p><a href="https://i.stack.imgur.com/eTipY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eTipY.png" alt="Local" /></a></p>
  <p>Actually there are a lot of plugins for Videogular and they all are using <code>$templateCache</code> to store some files in the cache, so it would be very confusing to manually store them locally in my app folder.</p>
  <p>How can such files be stored in the cache using <code>$templateCache</code> so they can be  extracted properly?</p>
  <p>I apreciate your help.</p>
  <p><strong>UPDATE</strong></p>
  <p>I have tried insert <code>$templateCache.get</code> to directive, where the part is loading with error 404, and it works. But still doesn't work as it supposed to be.</p>
  <p><a href="https://i.stack.imgur.com/FBvBe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FBvBe.png" alt="issue" /></a></p>