Skip to content Skip to sidebar Skip to footer

Angularjs - Javascript Not Loading Inside Partial Views

I tried using directives to load the script but its not working, I've an application where it should display a chart(guage meter) inside a partial, tried to paste the script inside

Solution 1:

ng-view will not load the scripts inside the template. Check this.. https://stackoverflow.com/a/18220411/4578788 for more details.

Solution 2:

Angular uses a stripped down version of jquery (jQLite) which has some DOM limitations which prevents it from executing a script file in partial view.

Solution

Reference a jQuery script before referencing main AngularJS script in your index.html. This will make angular to use jQuery instead of jQlite.

Post a Comment for "Angularjs - Javascript Not Loading Inside Partial Views"