Giter Club home page Giter Club logo

lightstreamer-example-stocklist-client-angular2's Introduction

Lightstreamer - Basic Stock-List Demo - HTML (Angular) Client

A simple stocklist demo application showing integration between Angular and the Lightstreamer Web Client library.

Live Demo

screenshot

Details

This demo displays real-time market data for ten stocks, generated by a feed simulator in a similar way to the Lightstreamer - Basic Stock-List Demo - HTML Client.

This page uses the JavaScript Web Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses Angular to display the real-time data pushed by Lightstreamer Server.

A Lightstreamer Subscription is used for subscribing to the data. The onItemUpdate callback implementation fills an object that is used by Angular to populate the HTML.

The demo includes the following client-side functionalities:

  • A Subscription containing 10 items, subscribed to in MERGE mode.

Install

If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:

  • Note that, as prerequisite, the Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • Launch Lightstreamer Server.
  • Build a lightstreamer.js file from the online generator and put it in the src/js folder of the demo. Be sure to include the LightstreamerClient, Subscription, ConnectionSharing, and StatusWidget modules and to use the "Use globals" version.
  • Change the current directory to the location of the file package.json and issue the commands npm install (to install Angular libraries) and npm run build (to compile Typescript files). Be sure to have installed Node.js and npm and verify that you are running at least node v5.x.x and npm 3.x.x by running node -v and npm -v in a console window.

You can deploy this demo inside Lightstreamer internal web server or in any other web server. If you choose the former, please create the folders /pages/demos/[demo_name] into your Lightstreamer server installation then copy the contents of the src folder of this project there.

The client demos configuration assumes that Lightstreamer Server, Lightstreamer Adapters, and this client are launched on the same machine. If you need to target a different Lightstreamer server, please search for this line:

var lsClient = new LightstreamerClient("http://localhost:8080","DEMO");

in app/stock.service.ts and change it accordingly.

The demo is now ready to be launched.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer Web Client library version 6.0 or newer.

lightstreamer-example-stocklist-client-angular2's People

Contributors

acarioni avatar dario-weswit avatar deepprojects avatar npmcdn-to-unpkg-bot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.