All Questions
79
questions
0
votes
2
answers
547
views
Using Underscore.js with require.js: Uncaught ReferenceError: _ is not defined
I have Underscore.js 1.13.2 and I include it using requireJS 2.1.14.
paths = {
'underscore': my_folder_path + "/underscore", // for underscore.js
.. //path of other files
}
I see in the ...
0
votes
1
answer
48
views
Loading Backbone.js with require.js
We are using OCC platform for our E-Commerce site which uses require.js to load the modules,
We need to load backbone and Underscore.js but when we use both the library we get the error that ...
1
vote
0
answers
31
views
Mixins not available some of the time
My current set up uses requireJS for module loading and Underscore for its many utility features.
The issue is that the custom mixins I'm adding to Underscore are sometimes unavailable. It seems ...
0
votes
1
answer
70
views
Backbone.js : Associating params to events callback function
I am creating custom events for a list of events. I have these events in a file (event.js) like this:
define(function(require, exports, module) {
module.exports = {
'event1': ['test1','data1'],
...
0
votes
1
answer
402
views
RequireJS shim config for ngRoute and Underscore.js
I am trying to load the dependencies for various angular modules using require.js. After configuring the dependencies in dependencies.js file, I get an error while loading the application which states ...
5
votes
1
answer
2k
views
Uncaught SyntaxError: Unexpected token import in "backbone.radio.js"
I'm trying to migrate an application from Backbone to Marionette (v3), but I got stuck in a point for two days already.
When I try to run the app in browser, this error shows up in the console (and ...
1
vote
2
answers
2k
views
Why do I need to load jquery twice [duplicate]
In my html page, I need to put jquery twice. If I take anyone of them out my page , then the page does not get rendered. Kindly note that both the included "jquery" are pointing to same location.
I ...
0
votes
1
answer
38
views
Using Require with underscore Map causes require notloaded exception [duplicate]
I am trying to map a list of data to my array as following:
this.data = [];
_.map(dataList, function(element){
var logic = require('./'+element+'/'+element);
var tempalte = require('text!./' +...
1
vote
0
answers
145
views
Requirejs potential race conditions loading backbone and underscore
The error belowhappens around 1/10 refreshes when using requirejs to pull backbone and underscore from amazon s3 that is defined in the require shim located in the /shared/common.js file.
The ...
0
votes
1
answer
287
views
Underscorejs when used with requirejs returning undefined
I am using requirejs and in one of my files underscore is a dependency. The below is the piece of code to include underscore.
define(["lib/underscore"], function(_) {
// Here _ is undefined
});
...
1
vote
2
answers
1k
views
How to load a dynamic view css file using requireJs & Backbone
I need that each view will load it's own css file when navigate to the view.
currently the css file have been loaded ( I can see it loaded on the network section) but it's not effect the page style
...
8
votes
2
answers
814
views
Using Lo-Dash and Underscore simulatenously in RequireJS environment
In a RequireJS environment, what's the best way to allow some AMD modules to use Lo-Dash while others simultaneously use Underscore?
1
vote
1
answer
466
views
Backbone View Render with Loop no data?
I'm currently building a backbone JS page with underscore and require, everything seems to work but my HTML gets renderd the correct number of times but without the data?
Please check image at bottom ...
2
votes
0
answers
209
views
underscore template with require js text plugin not working
So I've this template in a html file -
<%= x %>
And in one of my view, it's been loaded with help of requirejs. I want to load this template with data.
var template = _.template(this....
1
vote
2
answers
1k
views
Is it possible to use the most recent versions of JQuery, Underscore and Backbone without RequireJS?
Until now, I had a compatible combination of libraries (JQuery, Underscore, Backbone). They worked without any problems.
But these versions are pretty old and I want to upgrade to the newer versions. ...