• Client API
  • Lightstreamer client implementation with Angular 2

Hello,

Lightstreamer widgets work best in straight Html pages.
If you want to implement an Angular app, you should rely on Angular components only.
Hello,
I need some help how to write code for COMMAND mode subscription in Angular components. I have implemented MERGE subscription it's working fine. There is no issue on Angular service and components. Only issue on COMMAND mode subscription.
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.
Hello,
Is there a way subscription update after dynamically binding rows using MERGE subscription. For example I have 4 rows of data to show the stock market rate, admin having option to change the given set of data-item on that time ajax method used to update the table and dynamically recreate the subscribed items. Now I need to update subscription after alter the table row using ajax. Is this possible?
I’m sorry, but it is not possible to change the items bound to a Subscription object while the subscription is active.
You should unsubscribe from the old items and subscribes to the new ones.
3 months later
Hi, is lightstreamer-client-web or lightstreamer-client applicable for angular 10 and it's Ivy renderer?


Thanks in advance
    Hello,

    Lightstreamer Web Client library is compatible with any version of Angular.
    You can download it from here.

    kate Hi, is lightstreamer-client-web or lightstreamer-client applicable for angular 10 and it's Ivy renderer?


    Thanks in advance

    • kate replied to this.

      Alessandro.Carioni Hello,

      Lightstreamer Web Client library is compatible with any version of Angular.
      You can download it from here.



      What about deprecated lightstreamer-client library?
      For new developments we recommend to use the package lightstreamer-client-web because it contains a lot of improvements and bugfixes.
      The other package lightstreamer-client is for users who have to maintain legacy code.
      You can find a detailed changelog with all the differences between lightstreamer-client-web(which encompasses versions 8.x or above) and lightstreamer-client (which encompasses versions 7.x or below) here.