Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

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

share|improve this question
2  
Have you added something like <script src="resources/vendors/angular/angular.min.js" /> into your html file ? – biology.info May 2 '15 at 22:08
up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.