Skip to content

gurov/work-time

Repository files navigation

work-time

It's small component for change work time scheduler. Preview: work-time preview

See and try example here.

Required libs

  • angular 7+
  • bootstrap 4+

Installation

To install this library, run:

$ npm install work-time --save

In your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

// Import 
import { WorkTimeModule } from 'work-time';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    WorkTimeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Using

Once WorkTimeModule is imported, you can use <work-time> component:

Component
import { WorkTimeType } from "work-time";
// ...
public data = [];
public workTimeType = WorkTimeType.REGULAR;
public readOnly = false;
Template
<work-time
      [(ngModel)]="data"
      [workTimeType]="workTimeType"
      [readonly]="readOnly"></work-time>

License

MIT © Pavel Gurov