All Questions
Tagged with requirejs underscore.js
141
questions
1
vote
1
answer
296
views
Onclick functions not firing in handlebarJS, requireJS, BackboneJS and underscoreJS combination
I am using requireJS with backboneJS and underscoreJS in my application.
I am using handlebarJS to load the contents dynamically. in the handlebars, i am adding onclick functions from parsed JSON data....
0
votes
1
answer
1k
views
How to load html file in backbone.js?
My backbone view folder:
view.html
tmpl/t01.html
tmpl/t02.html
tmpl/t03.html
view.html:
...
<div id="tmpl"></id>
in view.html, when I click button 01, I would like to display tmpl/t01....
-1
votes
1
answer
299
views
Backbone Marionette: parameters undefined in view (data is defined)
The data that I'm trying to pass to my template is inexplicably ignored when it gets to underscore's template renderer.
The data is available:
Yet I get an exception in the console that the param ...
1
vote
2
answers
2k
views
Require.js Module Path Scope Issue
I don't understand why my view module (overlay.screen.view.js) require variables are undefined (Uncaught TypeError: Cannot call method 'template' of undefined) when alerting. The paths appear to be ...
2
votes
1
answer
3k
views
Require.js: When extending a module can I use prototype directly or I should use extend as well?
If I am using Require.js for managing modules in a project with Backbone.js (which also has underscore), when extending a module I can do something like this
require(['Home'], function(home) {
'...
0
votes
1
answer
73
views
how does BackboneJS view's function binding works?
I am reading through BackboneJS View .
SearchView = Backbone.View.extend({
initialize: function(){
alert("Alerts suck.");
}
});
// The initialize function is ...
0
votes
1
answer
444
views
requireJS: shim or amd version of backbone, underscore
I was going through this backbone tutorial. Here both shim and amd version of underscore and backbone has been used to load the script file.
The reason behind has been given that shim doens't load ...
0
votes
0
answers
55
views
Use same Backbone collection in nested object during parse [duplicate]
AbstractProductCollection.js:
define([
'app',
'models/AbstractProductModel',
'models/ProductModel',
'models/PackageModel'
],
function (app, AbstractProductModel, ProductModel, PackageModel) {...
1
vote
1
answer
447
views
View did not render using require.js text! plug-in
I'm using text! plug-in of require.js to load javascript templates of my backbone project.
Here my mini_signin.html
<script type="text/template" id="signinTemplate">
<div class="...
0
votes
1
answer
84
views
Referencing enum value held inside of a require module from underscore template
I have an enum called repeatButtonState.
// repeatButtonState.js:
define({
DISABLED: 0,
REPEAT_VIDEO_ENABLED: 1,
REPEAT_STREAM_ENABLED: 2
});
I am now rendering repeatButton using ...
2
votes
1
answer
52
views
Why doesn't my plugin load its dependencies?
I working on an app that uses require.js to load dependencies. I have also written a plugin for jQuery that is used in the app. The jQuery plugin depends on Underscore but does not support AMD. My ...
3
votes
1
answer
865
views
Require.js is appending .map extension to my libraries
If I specify my paths config as a remote url they load fine.
require.config({
paths: {
jquery: '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min',
underscore: '//cdnjs.cloudflare....
0
votes
1
answer
525
views
Backbonejs / Underscorejs with RequireJS - Views not reloading Jquery after render
It's my first project using Backbone/Underscore and RequireJS. I have a "parent view" named Home and a child view named Sidebar. I got that the parent view loaded with the content of the child ...
1
vote
1
answer
370
views
(8 out of range 6) Underscore.js Templates
I am using Backbone.js and underscore.js with Requirejs. However when i try to load my view template, it gives me (8 out of range 6) error in Underscore.js line 8.
Please tell me what i am doing ...
1
vote
1
answer
930
views
RequireJS using Sugar Syntax?
I know that requireJS supports sugar syntax, is the following code correct to load the module located at js/window/startup.js, with the dependencies of jquery, underscore, and Backbone?
require....