All Questions
Tagged with requirejs underscore.js
141
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 ...
1
vote
0
answers
137
views
show local json data from collection in backbone.js
I have a local json file. I need to put these data in a Backbone.Collection, then receive this collection in a Backbone.View and render the data in a template. So I tried many ways but...
Model:
...
0
votes
0
answers
150
views
Backbone.js underscore template rendering issue
I'm having a hard time getting server data to render in my underscore template. The underscore markup displays on the page as a string, for example inside the div, you can see <%= test %>.
...
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
55
views
Require.js - order of loading libraries?
Im trying to make Single Page Application (with Knockout.js - it's necessary to use it) which imitates products page in online shop. Here's how it looks like (for better understanding):
main page
...
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
181
views
How to use underscore.string globally in a web page (with requireJS)
The documentation says once underscore.string included in my application, the library is available using s, __s global variables (http://epeli.github.io/underscore.string/#others), or within ...
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
909
views
lodash loaded through requirejs and with a script throws "Mismatched anonymous define" error
I am working on an application that uses requirejs and loads underscore with it but also loads underscore as a node_module using a script. Since we needed functionality found in lodash I decided to ...
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
2
answers
728
views
RequireJs text plugin and UnderscoreJs templates
Alright people,
I am using the RequireJs text plugin to pull in underscore templates (.html) in my backbone application. Unfortunately my underscore code in my templates are being rendered as plain ...
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. ...
1
vote
1
answer
221
views
My underscore template won't render my collection in my Backbone App
I'm new to backbone and have been working on my first app. I've been trying to display a collection through an underscore template, however my content isn't showing up. The template exists in require, ...
0
votes
0
answers
518
views
Dynamic Menus from JSON REST API using backbone.js
I'm newbie in Backbone.js, Marionette.js, underscore.js and require.js frameworks.
I'm trying to build a dynamic menu by calling REST API which returns a JSON array format.
Here is my JSON response :-...
0
votes
1
answer
719
views
Backbone.js: Collection is undefined when using template [duplicate]
I am currently trying to learn backbone.js on my own. I have looked at the tutorials such as Thomas Davis's @ https://backbonetutorials.com/ and youtube channels. I am trying to make a modular ...
1
vote
1
answer
334
views
Using UnderscoreJS with RequireJS
I'm trying to use/load UnderscoreJS 1.7.0 with RequireJS 2.1.14-3. At my application startup, UnderscoreJS is well loaded, but it is "undefined". See details below:
main.js
define(function() {
//...
0
votes
1
answer
532
views
Template not rendering underscore error
Hi i'm new to backbone using require and underscore. Want to render a template please correct me . Dont know where i'm going wrong.
mainParentTemplate.html
<div>
manojbojja
</div>
...
0
votes
0
answers
122
views
Backbone.js Collection.add method being overwritten by 3rd party script
I am having an issue with a method being overwritten on a dependency that is being injected with Require.
Currently I am have a utility that adds and controls some notifacations across our site that ...
0
votes
0
answers
131
views
Issue with r.js optimizer and Underscore _.template() function
I have an issue with Underscore (I use an old version [1.3.3] and can't use others for this project) _.template() function after creating optimized build.
After optimizing I have a file with all my ...
-1
votes
1
answer
683
views
using underscore templates with Backbone and Require.js
I'm trying to create a simple app using underscore templates and backbone (as described in this article). I'm sure that the template file is being loaded correctly, but I'm not so sure whether I'm ...
-1
votes
2
answers
593
views
Loading templates with underscore gives error
I have a requirejs webapp which loads a lot of libraries (it is rather complicated to jsfiddle the loading). The bottom point though is:
console.log(_.VERSION);
_.template("<p>");
In the ...