Electron Angularjs and jquery


Hey, I’ve been trying to build some stuff, and one of my requirements is to be able to use ng-include from angular to load an html file with their scripts working. I read up and apparently including jquery makes this work. Problem is…I am having trouble loading jquery. I’ve tried using $ = require('./js/jquery.js'); and a standard html <script>. Nothing seems to be working. It all throws errors. Can anyone help with including jquery in electron(before angular) without breaking stuff?

I could load scripts with the $.getScript function…but again, jquery isn’t working so I can’t.

EDIT: Found a way to do it without jquery, but still, it would be nice to know how to get jquery working…


What errors are reported? I was able to use jquery easily, the way you wrote.


Wow, i dunno…it’s working now.

<script> $ = require('./js/jquery-2.1.4.min.js'); $(document).ready(function(){ alert('hi'); }); </script>

Uhm, yeah, that’s making an alert with 0 errors.