1.0.6 • Published 7 years ago

ng2-timeline-simple v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ng2-timeline-simple

Installation

To install this library, run:

$ npm install ng2-timeline-simple --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install ng2-timeline-simple

and then from your Angular Module:

// Import your library
import { Ng2TimelineSimple } from 'ng2-timeline-simple';

@NgModule({
  declarations: [
      XComponent
  ],
  imports: [
    // Specify your library as an import
    Ng2Timeline
  ],
  providers: [],
})
export class XModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<ng2-timeline-simple [data]="timelineData"></ng2-timeline-simple>

In your component class create the parameter and callback function

@Component({
  templateUrl: './x.component.html',
  selector:'x'
})
export class XComponent {
   /**
    * Each item will have title,content,complete flag and icon
    * which will be displayed on the side. Icon is in html
    */
  public timelineData:Array<Object> =[
    {
      title:"Step 1",
      icon:'<i class="fa fa-home"></i>',
      content:"Hello World",
      complete:true
    },
    {
      title:"Step 2",
      icon:'<i class="fa fa-home"></i>',
      content:"Following step to complete",
      complete:false
    }
  ];

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

ng2-timeline-simple: MIT © Andrew McCluskey
Original ng2-timeline: MIT © Mohammed Rashid

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.1

7 years ago