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