1

I have the following directive:

.directive('tractionReport', function () {
    return {
      restrict: 'E',
      templateUrl: 'reports/traction.html'
    };
  });

reports/traction.html:

<div id="traction">

</div>

<script type="text/javascript" src="https://link.to.some.script/script.js"></script>
<script type="text/javascript">
  script.events.on('ready', function () {
    $('#traction').Timeline(options);
  });
</script>

When I use the inspect element in Chrome I can see that the template is being added correctly to the page and I can see the scripts there too, however nothing is actually being loaded. When I view the 'network' tab I can see that the js script is not being fetched.

Or Weinberger
  • 7,332
  • 23
  • 71
  • 116
  • This is addressed in this [SO question](http://stackoverflow.com/questions/21336350/angularjs-inline-script-in-the-included-html-template). This is because jqLite doesn't support script tags. Add full jQuery. – New Dev Oct 22 '14 at 08:45

0 Answers0