The model - JGdijk/ords GitHub Wiki
The retrieved models contain the following functions:
-
update(data) will update the model
data {name: 'new_task_name', ...}
-
remove() will remove the model
-
attach() see the relations section
-
detach() see the relations section
-
addRelation() see the relations section
e.g.
ords.use('task').find(1).subscribe(task => {
this.task = task;
})
let data = {name: 'new_task_name'};
this.task.update(data);