0

I use $routeProvider and load views HTML via <div ng-view></div>. In loaded file HTML there is HTML:

<script src="/public/js/tags/tokenize/jquery.tokenize.js"></script>
<link href="/public/js/tags/tokenize/jquery.tokenize.css" rel="stylesheet" type="text/css">

But these files are not connected in page. Also JS does not exicute on ng-view

Hamed
  • 410
  • 1
  • 13
  • 21

1 Answers1

0

This is because Angular thinks your <script> is the directive script. You have two possible solutions:

  • create a directive
  • include your code out of the app.

If you need to dinamically load your resources use a service, as suggested in this question.

Also, for reference, take a look to this question too

rpadovani
  • 7,101
  • 2
  • 31
  • 50