ngx-stopwatch

1.0.2 • Public • Published

Ngx-Stopwatch 1.0.1

Minimalistic stopwatch for Angular applications

GitHub GitHub tag (latest by date) GitHub repo size npm bundle size npm

Support

GitHub stars GitHub followers

Table of contents

Details

There's a showcase project with different examples on how to use the library. I don't think you'll have any problems using it in your projects. I aimed at keeping it simple yet flexible.

Feel free to comment, fork or submit a pull request.

Installation

ngx-stopwatch is available via npm

Using npm:

$ npm install ngx-stopwatch --save

Usage

Import NgxStopwatchModule in in the root module(AppModule):

// Import library module
import { NgxStopwatchModule } from 'ngx-stopwatch';
 
@NgModule({
  imports: [
    ...,
    NgxStopwatchModule
  ]
})
export class AppModule { }

Add NgxStopwatchService service wherever you want to use the ngx-stopwatch.

import { NgxStopwatchService } from 'ngx-stopwatch';
 
class AppComponent {
  constructor(protected stopwatchService: NgxStopwatchService) {}
 
  start() {
    this.stopwatchService.start();
  }
 
  reset() {
    this.stopwatchService.reset();
  }
}

You can now place it in your templates like this:

<ngx-stopwatch></ngx-stopwatch>

You can find more examples in the showcase project.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i ngx-stopwatch

      Weekly Downloads

      33

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      16.1 kB

      Total Files

      17

      Last publish

      Collaborators

      • fjrevoredo