ng-ticker-tape
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

NgTickerTape

This project was generated with Angular CLI version 10.0.3.

Demo

Check the ng-ticker-tape ticker

Installation

You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.

NPM

npm i --save ng-ticker-tape

YARN

yarn add --save ng-ticker-tape

Usage

Follow below steps to add ticker-tape in your project

1. Import NgTickerTapeModule

You need to import the NgTickerTapeModule in the module of your app where you want to use it.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
 
/* Import the module*/
import { NgTickerTapeModule } from 'ng-ticker-tape';
 
import { AppComponent } from './app.component';
import { CommonModule } from '@angular/common';
 
@NgModule({
    declarations: [
    AppComponent
    ],
    imports: [
    BrowserModule,
    NgTickerTapeModule // Import here,
    CommonModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

2. Use in your HTML

In your HTML: Use the <ng-ticker-tape> wherever you like in your project.

<ng-ticker-tape  
     [tickerData]="tickerData">
</ng-ticker-tape>

3. Structure of array to display the ticker data

Make sure you structure of array should look like array shown below,

tickerData = [
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'red',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        },
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'green',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        },
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'green',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        },
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'red',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        },
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'green',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        },
        {
        'target_currency_short_name': ' BTT',
        'price': 0.00047020,
        'color': 'red',
        'percentage': 11.206+'%',
        'base_currency_short_name': '/USDT' 
        }
  ];

Contribution

I welcome you to fork and add more features into it. If you have any bugs or feature request, please create an issue at github repository.

License

MIT

Package Sidebar

Install

npm i ng-ticker-tape

Weekly Downloads

9

Version

0.0.5

License

MIT

Unpacked Size

103 kB

Total Files

19

Last publish

Collaborators

  • saurabhagrawal