2
votes
4answers
35 views

How do I union/merge two Collections by their 'id' using UnderscoreJS

I have two collections (Menu and Orders) Menu collection contains array of Item objects [{'id': '1', 'name': 'apple'}, {'id': '2', 'name': 'orange'}] And Orders collection also contains array of ...
0
votes
1answer
40 views

Using variables for region names in Marionette

I'm building an application that makes heavy use of Marionette's Layouts and regions. However, I want to be able to pass a variable as a region when rendering, like this. var x = "main_region"; ...
0
votes
1answer
81 views

implementing extend method in javascript

By looking through the code of BackboneJS, i am interested about extend the implemented. by when i try to make it myself i am stuck. my code is the following. var extend = function(child) { var ...
4
votes
2answers
98 views

Shorthand way to construct JS object with variable property name

Is there a shorthand way to create an object with a property field variable? Say I have the variable PROP.Todo.PRIORITY = 'priority' and then, using Backbone in this example, I want to save this ...
0
votes
2answers
535 views

how to create object of model when using in backbone js in javascript

My problem is that i want to create object of model in javascript .I use backbone.js I want to share model object globally because I need that object in many js files (function(){ ...
0
votes
1answer
341 views

How do I set an object property within a Backbone model

Right, so I have a number of Backbone models going on, and in one of them I have an object that has a set of keys and values, of which the values are modified by locating the key from a string. So I ...