Skip to main content

All Questions

0 votes
2 answers
534 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 ...
Arshad Rehmani's user avatar
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: ...
ALi Hz's user avatar
  • 25
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 %>. ...
RomM's user avatar
  • 3
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 ...
RAVI singh's user avatar
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 ...
Tymur Yunusov's user avatar
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 ...
Luke Todd's user avatar
  • 123
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'], ...
user2991413's user avatar
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 ...
Simmoniz's user avatar
  • 1,080
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 ...
leo_roar_001's user avatar
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 ...
Consta Gorgan's user avatar
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 ...
Unbreakable's user avatar
  • 8,004
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!./' +...
user1322801's user avatar
1 vote
0 answers
908 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 ...
Michail Michailidis's user avatar
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 ...
Aleksandr Litvak's user avatar
0 votes
2 answers
727 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 ...
John williams's user avatar

15 30 50 per page
1
2 3 4 5
10