Skip to main content

All 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
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'], ...
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: ...
2 votes
1 answer
3k views

Module naming in RequireJS

We can use AMD compatible versions of BackboneJS and UnderscoreJS I had a look in the AMD compatible library for both (https://github.com/amdjs/) and below is the relevant code to make them AMD ...
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 %>. ...
15 votes
5 answers
10k views

RequireJS and text plugin Load timeout for modules

I am having some problems getting the RequireJS text plugin to work. This is possibly a path related issue (or something similarly obvious) but I can't solve it because neither the chrome console (...
0 votes
1 answer
282 views

Backbone.js initializing multiple router.js files

I am using Backbone.js require.js underscore.js to build an application. In my javascript, i have my mainrouter.js file which deals with the menu selection. The application is broken into several ...
4 votes
4 answers
3k views

How to solve a conflict between browserify (Backbone based app) and require.js on the same page?

I have a backbone app up and running correctly. It's meant to be used as a widget in 3rd pages. Unfortunately, I just realised that one of these pages has already Backbone / underscore loaded. I get ...
5 votes
1 answer
1k views

prevent caching of underscore templates parsed by text plugin of requirejs

I am using RequireJS text plugin to load templates and then evaluating in views. The problem is that the templates gets cached. So until I clear the cache, the templates rendered always have the old ...
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 ...
173 votes
6 answers
70k views

Loading Backbone and Underscore using RequireJS

I'm trying to load Backbone and Underscore (as well as jQuery) with RequireJS. With the latest versions of Backbone and Underscore, it seems kind of tricky. For one, Underscore automatically registers ...
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
2k views

require.js / js file loads before DOM loaded

I am new in MVC framework like backbone.js. I am trying to make an application using backbone.js, require.js and underscore.js. I also added jQuery UI. There is a js file named widget.js which ...
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=...

15 30 50 per page
1
2 3 4 5
10