Saturday, 17 August 2013

creating backbone model error

creating backbone model error

I am begginer in backbone.js When I cretaing a model with data , I have
error.
firstly a declared model as following;
var verifiedBookPriceSolutionApp = {
Models :{},
Collections : {},
Views :{},
Templates :{}
}
///BackBone model setting;
verifiedBookPriceSolutionApp.Models.Journey = new
Backbone.Model.extend({
initialize: function(){}
});
then I create a model as following,
var journey = {"key": "0T", "carrier": "PS", "carrierName": "Ukraine
International Airlines", "flight_number": "102", "origin": "AMS",
"destination": "KBP", "departure_time":
"2013-08-18T13:10:00.000+02:00", "arrival_time":
"2013-08-18T16:55:00.000+03:00"}
var JourneyModel = new verifiedBookPriceSolutionApp.Models.Journey(journey);
In this line , I have error like "Uncaught TypeError: Object [object
Object] has no method 'apply' "
I cant find a solution why I get such error.
regards ,

No comments:

Post a Comment