aurajs / aura

A scalable, event-driven JavaScript architecture for developing component-based applications.
MIT License
2.94k stars 255 forks source link

How to use jQuery and Flot with AuraJS ? #352

Open razorree opened 8 years ago

razorree commented 8 years ago

I've added

<script language="javascript" type="text/javascript" src="../js/jquery.js"></script> 
<script language="javascript" type="text/javascript" src="../js/jquery.flot.js"></script> 

in my application file (aura:application), and i can see files are included by browser (in developers tools console)

but during initialization i have an error:

aura_dev.js:2931 
Uncaught ReferenceError: jQuery is not defined
throws at http://localhost:8080/js/jquery.flot.js:32:3127
Logger.$devDebugConsoleLog$ @ aura_dev.js:2931
AuraInstance.handleError @ aura_dev.js:16312
AuraInstance.$reportError$ @ aura_dev.js:16348
newHandler @ aura_dev.js:18291
(anonymous function) @ aura_dev.js:18298
    aura_dev.js:2936 ReferenceError: jQuery is not defined(…)Logger.$devDebugConsoleLog$ @ aura_dev.js:2936AuraInstance.handleError @ aura_dev.js:16312AuraInstance.$reportError$ @ aura_dev.js:16348newHandler @ aura_dev.js:18291(anonymous function) @ aura_dev.js:18298

How to use jQuery and Flot with AuraJS ?