All Questions
Tagged with requirejs underscore.js
141
questions
2
votes
1
answer
787
views
RequireJS - How to configure Underscore before it's loaded by Backbone?
I'd like to know how to load Underscore and Backbone using RequireJS and be able to configure Underscore before it's passed to Backbone.
I've seen this popular question on StackOverflow about this ...
0
votes
2
answers
2k
views
best pratice to compile all templates files in a unique file with backbone/marionette
I have a huge application built with Backbone, Marionette, Require.js and this is an example of the view that I'm using:
define([
'backbone',
'text!templates/oauth.html'
], function (Backbone, ...
2
votes
1
answer
2k
views
RequireJS doesn't always load modules
20% of the time, the scripts fail loading while using RequireJS.
The additional files that I am using throu the application require, besides the JS libraries, the base.js file, which contains ...
0
votes
1
answer
41
views
Backbone.js Hiding path in console of web browser
I'm not sure whether require.js problem or not. Currently I'm coding using backbone.js, underscore.js, require.js and !text plugin.
Whenever I browser each router then my console is show all the path ...
0
votes
1
answer
5k
views
"Module name has not been loaded yet for context: _. Use require([])" Tracing Error in Complex Phonegap Application
"Module name has not been loaded yet for context: _. Use require([])"
I am porting a very large and very complex Cordova/PhoneGap application to Windows RT (the OS that runs apps on Windows 8 and the ...
0
votes
2
answers
2k
views
How to load a custom script with require.js and make it export an object which I can access in my Backbone views?
I am using require js for handling my Backbone application.
I want to load a script called global (where I'll have several miscellaneous functions which i want to use in certain Backbone views).
...
6
votes
2
answers
494
views
Why include jQuery and underscore in every JS file in Backbone/Require.js project
In almost every Backbone/Require.js project you will see models and views that look similar to this:
define([
'jquery',
'underscore',
'backbone'
], function ($, _, Backbone) {
//Some ...
0
votes
1
answer
199
views
backbone loaded with requirejs shim but still Backbone undefined error
I've read many answers and followed steps I could ( seems right to me) but still DevTools shows Backbone is not defined. error.
Here's how I use requirejs shim.
<script data-main="js/...
0
votes
2
answers
463
views
Can underscore debounce be called from a requires module?
I could not get the underscore debounce method to work from within a requirejs module. As an alternative, I can make a pseudo-debounce method via the window.setTimeout, but then I have to test the ...
0
votes
1
answer
259
views
R.js compilation of non-AMD modules
I have non-AMD backbone, non-AMD underscore and non-AMD jquery in my project. I also have a lot of third party libraries that are not AMD compatible.
What is the best way of having them compile ...
4
votes
1
answer
7k
views
requirejs: Module name "underscore" has not been loaded yet for context [duplicate]
I always get this error when I freshly load my app,
Error: Module name "underscore" has not been loaded yet for context:
_. Use require([]) http://requirejs.org/docs/errors.html#notloaded
...,h){c=...
5
votes
1
answer
17k
views
Load timeout for modules with requirejs
I'm using requirejs to load some libraries and dependencies.
When I just load jQuery, it's working perfectly:
main.js
require.config({
shim: {
jquery: {
exports: '$'
}
},
paths: ...
1
vote
1
answer
577
views
requirejs - underscore module not loaded
Seeing error - I'm not sure what exactly is wrong. Page/Modules loads sometimes but many a times I get this error. This is with latest underscore and backbone modules.
Error: Module name '...
0
votes
1
answer
78
views
RequireJS does not include required objects
given code below:
require.config({
baseUrl: '',
paths: {
'jquery' : 'js/lib/jquery',
'text' : 'js/lib/text',
'underscore' : 'js/lib/underscore',
'...
0
votes
1
answer
859
views
router.js Function not executed
// Filename: router.js
console.log('TEST ROUTE');
define([
'jquery',
'underscore',
'backbone',
'views/jobs/list'
], function($, _, Backbone, JobListView){
var AppRouter = Backbone....