path() method has no effect?
Opened this issue · 4 comments
matthew-dean commented
I have jquery located at /js/lib/jquery.js.
This is my code:
$script.path('/js/');
$script('lib/jquery.js', 'jquery', jQueryLoaded);
The jQueryLoaded function never gets called, and Chrome Developer Tools says that the request was for /lib/jquery, not /js/lib/jquery. Any ideas?
matthew-dean commented
Er, looking through the code, it appears the documentation is outdated, and in order for the path method to apply, all of the JS files need to NOT have '.js' as part of the call?
francisrod01 commented
I have the somme problem!! =(
https://github.com/ded/script.js#scriptpath
<!-- your app's js -->
<script src="App/Script.js"></script>
<script type="text/javascript">
$script('lib/angular-route/angular-route.min.js');
$script([
'App/App.js', 'App/Controller.js'
], function() {
angular.bootstrap(document, ['starter']);
});
$script.path('Controllers/', function(err) {
console.log(err);
});
</script>
See screenshot:
Console error:
Error: [ng:areq] Argument 'HomeCtrl' is not a function, got undefined
http://errors.angularjs.org/1.3.13/ng/areq?p0=HomeCtrl&p1=not%20aNaNunction%2C%20got%20undefined
Please, help me with this problem!
ded commented
remove .js
from the extension...
francisrod01 commented
@ded this version v2 is running on! :)