-
-
Save EdwardIII/5077789 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the_event.fetch({success: function(){ | |
var tickets = the_event.get('tickets'); | |
var guestlist = new GuestList(); | |
for(i=0; i<tickets.length; i++){ | |
tickets[i]['desired_quantity'] = ko.observable(0); | |
guestlist.add(tickets[i]); | |
} | |
console.dir(tickets); | |
var viewModels = { | |
ticketViewModel: new TicketViewModel(tickets), | |
'guestlist': guestlist, | |
personalDetailsViewModel: new PersonalDetailsViewModel() | |
} | |
ko.applyBindings(viewModels); | |
}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment