./tasks.ctpl
    :foreach task in tasks :do
  • ${task_i}: ${task.text} (${task.id})
  • :endforeach
$self.add = function(v) { $self.$tasks = $self.$tasks.concat([v]); } $self.remove = function(i) { $self.tasks.remove(i); // This below is a little tricky, seems that we assign a field to a it self, but // actually we are using a CORD feature to force update of part of container that // reference a field: any assign to a field where the field name is prefixed with // '$' will force the update (without '$' is lazzy and wait for a future update). $self.$tasks = $self.tasks; }