0.0.6 • Published 5 years ago

ngx-horizontal-timeline v0.0.6

Weekly downloads
174
License
MIT
Repository
github
Last release
5 years ago

Installation

$ npm i ngx-horizontal-timeline

Usage

Import

import { NgxHorizontalTimelineModule } from 'ngx-horizontal-timeline';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    NgxHorizontalTimelineModule
    ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Component

...
items: TimelineItem[];
 
ngOnInit() {
  this.items.push({
    label: 'Test 1',
    icon: 'glyphicon glyphicon-adjust',
    active: true,
    title: 'Example 1',
    color: '16a085',
    command() {
      console.log('Action 1');
    }
  });
  
  this.items.push({
    label: 'Test 2',
    icon: 'fa fa-plus',
    title: 'Example 2',
    color: '2980b9',
    command() {
      console.log('Action 2');
    }
  });
}

Template

<ngx-htl-horizontal-timeline [(items)]="items"></ngx-htl-horizontal-timeline>
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago