All posts tagged isnew

There is no magic behind backbone.js model.isNew()

model.isNew() can be quite useful, this method can be interesting when handling and changing forms behaviors from adding new items, to updating and deleting them. At first I did not quite understand how isNew() was working internally and, one day it just stopped working and that was frustrating!

It’s all about the id

One thing I like to do is prepopulate my fields with defaults values. Backbone has a great feature for that, when instantiating a model you can pass… Read the rest