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
  • 48,723
  • 33
  • 63
  • 158
CJAY
  • 6,435
  • 17
  • 58
  • 100

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,435
  • 17
  • 58
  • 100
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
  • 12
  • 18