Using third-party Javascript in PartialJS Partials?

I use partial AngularJS templates to create a toolbar. There is a listing, and when you click on an element, it switches to a partial element-part.

In the detail part of the part, I would like to show some graphs through RGraph. However, for the life of me, I cannot figure out how to do this.

I cannot call javascript from partial html. So I think I need to do this in the controller or create a directive?

I am new to AngularJS, so my understanding is still very rudimentary and probably erroneous.

+1
source share
1 answer

AngularJS ("jqlite") does not support lt <script> tags inside partial ones.

Include jQuery on your page and it should work. Note that jQuery must be enabled before AngularJS.

See also AngularJS: How to make angular script load inside ng-include?

+6
source

All Articles