Fork me on GitHub
LIGHTSTREAMER
BASIC STOCK-LIST DEMO
These demos show the integration between Lightstreamer JavaScript Client library and Google's AngularJS.

To learn more visit the project page on github and explore the source code of the application.

Access by name

In this first example the model behind the view is made by a JSON object that is expanded by angular using a single ng-repeat directive. Each item is indexed in the object by item name: the resulting iteration produces a table that is not ordered.
Name Last Time Change Bid Size Bid Ask Ask Size Min Max Ref. Open
{{item.stock_name}} {{item.last_price}} {{item.time}} {{item.pct_change}} {{item.bid_quantity}} {{item.bid}} {{item.ask}} {{item.ask_quantity}} {{item.min}} {{item.max}} {{item.ref_price}} {{item.open_price}}

Iterate through index

In this case the model is composed by an Array of Arrays that is expanded using two nested ng-repeat directives. Each item keeps its own index in the resulting array, that's why the table results sorted by stock name.
Name Last Time Change Bid Size Bid Ask Ask Size Min Max Ref. Open
{{field}}

Use ng-grid

In this case the view is composed by ng-grid (thus the model behind is structured as ng-grid requires). This makes to manipulate the data using all the features exposed by that library.