Skip to content

Instantly share code, notes, and snippets.

@BramKaashoek
Last active September 21, 2017 14:45
Show Gist options
  • Save BramKaashoek/294ac8044e32204a794339159f6895b2 to your computer and use it in GitHub Desktop.
Save BramKaashoek/294ac8044e32204a794339159f6895b2 to your computer and use it in GitHub Desktop.
//..
self.title = ko.observable();
self.description = ko.observable();
self.startDate = ko.observable(new Date());
self.endDate = ko.observable(new Date());
//...
self.createMeeting = function(){
var meeting = {
_id: '',
title: self.title(),
startDate: self.startDate(),
endDate: self.endDate(),
description: self.description(),
};
var meetingError = function(jqXHR, textStatus, errorThrown){
console.error('Error in Create: ' + textStatus);
};
MeetingsService.create(meeting, null, meetingError);
};
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment