Results 1 to 10 of 28

Hybrid View

  1. #1
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    Yes it's working in normal html, only issue on Angular. Is this possible to use same method used in html and javascript in Angular application also.

  2. #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.

  3. #3
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    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.

  4. #4

    Arrow

    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,

    Code:
    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.
    Last edited by Alessandro Carioni; July 16th, 2020 at 08:21 AM.

  5. #5
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    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?

  6. #6
    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.

 

 

Similar Threads

  1. implementation of lightstreamer for a quiz contest
    By Sameer Mhatre in forum Adapter SDKs
    Replies: 1
    Last Post: July 10th, 2013, 09:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 12:29 AM.