2

I am using AngularJS to build SPA(single page app).i have multiple pages which has linked to jquery.js. when i run the pages separately all the jquery functions successfully executing, but when i access those files from the ng-view element. the jquery from other pages is not at all executing. What may be the problem?

Roman C
  • 49,761
  • 33
  • 66
  • 176
CJAY
  • 6,989
  • 18
  • 64
  • 106

2 Answers2

1

I solved it by just removing

$(document).ready(function(){    });

which is inside the embedded pages. Now jquery in all other pages is working fine.

CJAY
  • 6,989
  • 18
  • 64
  • 106
0

You should use angular.element('#element') instead of jQuery(#element) or $(#element). Any manipulation done with jQuery might not be reflected in your angular state.

Bwaxxlo
  • 1,860
  • 13
  • 18