When I press F5 to restart, the application sometimes throws errors, and sometimes not.
I am debugging Chrome. Sometimes the console reports this error:
Uncaught ReferenceError: unit_directionals is not defined
sometimes it shows that the link is not defined, as in this case for jquery: "Uncaught ReferenceError: jQuery is not defined"
What could be wrong if I defined the files correctly?
this is the code i have in main.js specified in the main html index:
requirejs.config({
baseUrl: 'js/lib',
paths:{
app:'../app',
models: '../app/models',
views: '../app/views'
}
})
requirejs(
[
'underscore', 'handlebars', 'jquery','backbone', 'uri',
'app/models/items.model', 'app/models/results.model',
'app/views/items.view', 'app/views/results.view',
'app/index'
],
function(jQuery,$,_....) {
}
);
source
share