title: AngularJS - Templates : ngInclude directive
body: <p>My templates contain JS, as they are called JS is not executed, you have an idea please.</p>
  
  <p>For example in my JS file script.js, i have methods that apply to HTML elements in my templtes and it does not work, an idea please.</p>
  
  <p>Example :</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
  &lt;/head&gt;
  &lt;body ng-app&gt;
      &lt;ng-include src="'header.html'"&gt;&lt;/ng-include&gt;
      &lt;script src="angular.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.js"&gt;&lt;/script&gt;
      &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>header.html</p>
  
  <pre><code>&lt;div id="header"&gt;
  &lt;div id="logo"&gt;AngularJs&lt;/div&gt;
  &lt;div id="nav"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>script.js</p>
  
  <pre><code>$(document).ready(function(){
      $('#nav').html('&lt;ul&gt;&lt;li&gt;&lt;a href=""&gt;Link&lt;a&gt;&lt;/li&gt;&lt;/ul&gt;');
  });
  </code></pre>
  
  <p>The script execute well, I feel it does not find the element div#nav.</p>