Views in the Backbone.js library. Backbone views are used to reflect what your applications' data models look like. They are also used to listen to events and react accordingly.
Questions tagged [backbone-views]
1114 questions
0
votes
1 answer
Backbone JS, collection view empty for a second when fetching
I bind the collection to a DOM element '#collection_view'.
When collection fetching data and update the view, the view changed to be EMPTY for a second and then filled with correct HTML.
In the collection there are addAll, addOne methods to append…

Bruce Dou
- 4,673
- 10
- 37
- 56
0
votes
1 answer
Am I structuring my app the right way? - Backbone.js
I am very new to Javascript and backbone.js. Have developed an application in AS3 using RobotLegs and need to port it to Javascipt. For the client side MVC, I started looking at Backbone.js. The concepts seem straightforward but I'm a little unsure…

smaira
- 307
- 4
- 19
-1
votes
1 answer
It possible to show attributes from model to other attributes from model?
Hi i have a view with model attributes :
name: "P",
surname: "a",
sorters: ["name","surname"] // dynamical array ( parameter to show )
in template :
<% for(i=0 ;i
<%= sorters[0] %>
// its <%= 'name' %>…
Przemek eS
- 1,224
- 1
- 8
- 21
-1
votes
1 answer
Will rendering multiple views in Backbone happen synchronous or asynchronous?
Let me start by saying this is a theoretical question thus I cannot provide you with any code.
I'm thinking about a Backbone structure where multiple views get rendered on one page. Every view contains a render function with one or more API calls…

webdev_be
- 53
- 7
-1
votes
1 answer
keydown event cannot be listened correctly
My codes:

BAE
- 8,550
- 22
- 88
- 171
-1
votes
2 answers
Dom elements not updated when accessed inside backbone afterRender()
Here is my render() function:
initialize: function() {
this.selectDivView = new SelectView({
url: '/ir/secure/api/v40/myvariants/myVariantDBs',
method: 'POST',
template: myVariantDBFilterTemplate
});
},
render:…

ashy143
- 169
- 11
-1
votes
1 answer
how to parse and bind complex JSON in backbone.js with view model controller approach
I am using one complex JSON structure as a result of one Ajax call. Here I need "many different kinds of nested models in one parent model".For each person, I am using one EmployeeContext. I need this as my parent model.
Within this EmployeeContext,…

jaison
- 83
- 2
- 8
-1
votes
1 answer
Backbone.js doesn't work
I have the next html page:
...
...
the 'pep.js' contains the next content:
var pep = {
models: {
},
…

HailToTheVictor
- 388
- 2
- 8
- 28
-1
votes
1 answer
Adding collection retsults to view and template
I am using backbone to connect to a 3rd-party api. I am getting data back, but I'm having a hard time figuring out how to display the data.
The API returns an object that contains an array of video recordings. I can see the object in my browser…

SkyeBoniwell
- 6,345
- 12
- 81
- 185
-1
votes
1 answer
backbone js view how to display
I am new to backbone js and somehow i managed to read the json file and get the data to the controller. Now how do i pass the data to my view. I am ok if the data is displayed with ul tags.All i want is to display the data from json…

alaksandarjesus
- 103
- 1
- 9
-1
votes
1 answer
how to show "hello world" backbone-marionette.js?
I am trying to trying a view using backbone +backbone-marionette.js..But I am able to get alert in route .But I want to display a view .But I am not able to display my template ?could you please tell me how to show my first view in angular…

user944513
- 12,247
- 49
- 168
- 318
-1
votes
1 answer
backbone.js $el for subview not available at the time the parent view initializes it
I'm trying to render a subview within a view in Backbone. I'm following this example:
http://backbonetutorials.com/examples/modular-backbone/
which seems to work fine. This is my code for the parent view:
define([
'jquery',
'underscore',
…

mheavers
- 29,530
- 58
- 194
- 315
-1
votes
1 answer
Duplicate Username should not be allowed
I have created UI for users to create their own username and password. Username and passwords are stored in JSON format.
Workflow:
When user clicks on Register Button, user will be presented with UI
screen with username and password input text…
-1
votes
2 answers
Why is this Backbone model's attribute undefined when I try to get it?
I've got a simple REST API that gives me data about an item at /api/items/:id, including ID and name. I'm using a Router to organise my Backbone views. The edit route instantiates a FormEditItem view, passing it the ID from the URL.
To get the data…

And Finally
- 5,602
- 14
- 70
- 110
-1
votes
1 answer
Unable to iterate over collection with Backbone.js
I am very new to backbone and I am trying to troubleshoot an error in someones code. The problem is that I have a collection that I cant seem to iterate over. If I put a break point prior to the each loop, I can see that the collection exists but…

jason
- 3,821
- 10
- 63
- 120