Hello,
You should install the listener
onItemUpdate on your subscription object and then update, add or remove rows of your table component according to the values of the fields
key and
command.
For example,
sub.addListener({
onItemUpdate: function(update) {
var cmd = update.getValue('command');
var key = update.getValue('key');
switch (cmd) {
case 'UPDATE':
// update row identified by key
update.forEachChangedField(function(name, pos, value) {
// update field of the row
});
break;
case 'ADD':
// add a new row identified by key
break;
case 'DELETE':
// delete the row identified by key
break;
}
}
});
In the snippets above, you should replace the comments with Angular code.
Unfortunately we are not Angular experts, so we cannot help with this last point, which depends on the specific Angular widgets you want to use.