I'm new to Aurelia, so I'm not sure how this should work. I created a new Aurelia project and also installed bootstrap by simply running jspm install bootstrap . I saw in the console that this was also pulling jquery 3.0.0 .
Now my question is: how to use bootstrap.css , bootstrap.js and jquery.js in my project?
First try:
In app.html I tried to do the following:
<require from="bootstrap"></require>
I tried this because I have the following line in config.js :
map: { ... "bootstrap": "github:twbs/ bootstrap@3.3.6 ", ... }
This view works in the sense that it loads bootstrap.js , but then gives an error in the browser that it is missing jquery.js . Thus, this does not automatically load jquery for me. This is normal?
Second attempt:
I changed my require to this in app.html :
<require from="jquery/dist/jquery.js"></require> <require from="bootstrap/css/bootstrap.css"></require> <require from="bootstrap/js/bootstrap.js"></require>
I'm not sure how he knows where to look for bootstrap.js and bootstrap.css files, as they are located in: jspm_packages/github/twbs/ bootstrap@3.3.6 /css/bootstrap.css , etc. But he knows how to find bootstrap files. But not a jquery file.
I have this in my config.js for jquery:
map: { ... "github:twbs/ bootstrap@3.3.6 ": { "jquery": "npm: jquery@3.0.0 " }, .... }
So basically my question is: how should this work? If require autoload all the necessary files when I <require from="bootstrap"> . Or should I upload them as separate files? If so, then how do I load jquery in this case?