Questions tagged [backbone-model]

Models in the Backbone.js library.

Docs

325 questions
0
votes
5 answers

this.save in backbone

I am on way to learning backbonejs. I am working with the popular todo list tutorial. I have certain questions about which i am a bit confused: In one the models i found this function: toggle: function() { this.save({completed:…
beNerd
  • 3,314
  • 6
  • 54
  • 92
0
votes
1 answer

Backbone - on change not consoling.. what is wrong?

I am consoling the height, while it get changed, as well i am binding the change event to the element. still i am not getting the console output here... i am very new to backbone, any one correct my mistake? var Person = Backbone.Model.extend({ …
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
0
votes
2 answers

In backbone "why the model created", what is the use of it? - below is my code

I took a small code from backbone home site, and consoled the function, in this example, sidebar.on('change:color'), takes the function. but it requires two parameter, one is abiously we need that is 'color', and we defining the element inside the…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
0
votes
1 answer

Custom editor for tags in Backbone

I'm using backbone forms and have been creating customising editors to meet my needs. I've now moved onto wanting to edit tags for a model and before I go ahead and implement my own, I was wondering if there was already a custom editor capable of…
Pete Hamilton
  • 7,730
  • 6
  • 33
  • 58
0
votes
1 answer

How do I map json or geojson into a backbone model and then how do I map that model into a leaflet layer

I am creating layer definitions that I can add individually into into a collection where I will then render the view or to a L.LayerGroup from the leaflet api, but I am unsure how to map the properties or if there is a mapping function? I am…
J10598
  • 21
  • 5
0
votes
2 answers

Getting 'type' of a View's model

you can access View's model from the View methods - like render() (through its model property). But let's say you have many different models and use the them with the same type of View, changing view's model property when you need. How can you…
-1
votes
1 answer

Issue with backbonejs model objects json representation

I have a question related to contained backbonejs model objects. Using yeoman backbone generator described at https://github.com/yeoman/generator-backbone, I created a backbone application to test how a model object that contains another model…
Ganesh
  • 44
  • 1
  • 6
-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
-2
votes
1 answer

JavaScript, disable breakpoints

In order to secure my SPA, I need a way to disable all the JS breakpoints. Currently, I'm still able to add runtime breakpoints with Chrome DevTool and change variable value of my objects. Not in the console but in the runtime. If an attacker is…
-4
votes
1 answer

Backbone event behavior

I'm just getting started with backbone, and I have run into a very confusing wall. What I am doing: Create a model instance of type A that calls fetch during initialization. Create a model instance of type B that calls fetch during…
1 2 3
21
22