Integrate JavaScript implicit includes to AngularJS partial views

98 Views Asked by At

I am trying to create an AngularJS application that uses Google Blockly, using some partial views inside my application.

Attempting to set up the JS dependencies of Blockly inside Angular, I noticed that the core JS library of the Blockly framework adds dynamically dependencies (using document.write(".....") calls) to the HTML file that plays its main view role.

This is very problematic if I want to set the Blockly editor main view to be a partial view, as those JavaScript imports will be added to the partial view, and Angular will not include them correctly, as they will be out of the main index.html file.

My guess is that I should approach this one differently, but I am not sure how - being new to AngularJS. By doing some research, I found that there are some frameworks for JS module loading management such as RequireJS, but again, they do not seem to have a way of such dynamic importing management. Are there any suggestions on this? Thank you in advance.

0

There are 0 best solutions below