Wednesday, 7 August 2013

How to update record in local storage using ember data and localstorage adapter?

How to update record in local storage using ember data and localstorage
adapter?

I am new to emberjs and making one simple CRUD application. I am using
ember data and localstorage-adapter to save record in local storage of
browser.
I am trying to update record using localstorage-adapter but it is throwing
error.
I have listed my code here :
updatecontact: function(){//save data in local storage
var fname = this.obj_form_edit_data.get('cont_data.fname');
var lname = this.get('cont_data.lname');
var email = this.get('cont_data.email');
var contactno = this.get('cont_data.contactno');
var gendertype = ((this.get('isMale') == true) ? true : false);
var contactype = $(".selectpicker").val();
Grid.ModalModel.updateRecords({
fname: fname,
lname: lname,
email: email,
contactno: contactno,
gendertype: gendertype,
contactype: contactype
});
this.get('store').commit();
}

No comments:

Post a Comment