1

in my angular app there is some partials that i load in ng-view. This partials has some jquery plugins that usually activates by document.ready. But this event not fire when angular load partial in ng-view. How can i call this event to initialize jquery plugins? Thanks for your attention.

1
  • Why do you rely on ready event? That's a job for controllers or directives. Commented Dec 11, 2013 at 14:09

1 Answer 1

5

In your partial's controller:

 $scope.$on('$viewContentLoaded', function () 
 {
   // javascript code here
 });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.