how to reference angular component template from django app
<p>I have the following angular component:</p>

<pre><code>angular.
module('phoneList').
component('phoneList', {
  templateUrl: 'phone-list.template.html',
  controller: function PhoneListController() {
    this.phones = [
      {
        name: 'Nexus S',
        snippet: 'Fast just got faster with Nexus S.',
        age: 1
      }, {
        name: 'Motorola XOOMâ¢ with Wi-Fi',
        snippet: 'The Next, Next Generation tablet.',
        age: 2
      }, {
        name: 'MOTOROLA XOOMâ¢',
        snippet: 'The Next, Next Generation tablet.',
        age: 3
      }
    ];

    this.orderProp = 'age';
  }
});
</code></pre>

<p>This template: <code>templateUrl: 'phone-list.template.html',</code> and the component are inside of my django app.</p>

<p>I have placed the template in:</p>

<blockquote>
  <p>myapp > templates > myapp > phone-list.template.html</p>
</blockquote>

<p>The reference gives me a 404 as well as angular error: </p>

<blockquote>
  <p><a href="http://127.0.0.1:8000/myapp/phone-list.template.html" rel="nofollow">http://127.0.0.1:8000/myapp/phone-list.template.html</a></p>
</blockquote>

<p><strong>Do I need to create a django url entry?
Do I need use a django url tag in the component?</strong></p>

<p>Templates in the <code>templates</code> folder in Django are available to the template loader only. They are not served and can not be accessed via HTTP directly. But that is what Angular does.</p>

<p>If you need to render the template in Django, make sure you have created a view and an endpoint for it in your <code>urls.py</code>.</p>

<p>If no rendering is needed and Django can use the template directly serve them like <a href="https://docs.djangoproject.com/en/1.10/howto/static-files/" rel="nofollow" title="static files">static files</a>.</p>

python angularjs node.js django