This repo is deprecated. Up to date version:
https://github.com/yp2/ngx-cron-jobs
Angular > 2 version of angular-cron-jobs (http://angular-cron-jobs.github.io/angular-cron-jobs)
To install this library, run:
$ npm install ngx-cron-jobs --save
$ yarn add ngx-cron-jobs
and then from your Angular AppModule
:
import { CronJobsModule } from 'ngx-cron-jobs';
@NgModule({
imports: [
...,
CronJobsModule,
...
]
})
export class AppModule { }
Once your library is imported, you can use its components, directives and pipes in your Angular application:
<!-- To insert to in your component minimal config with ngModel -->
<cron-jobs [(ngModel)]="hero.frequency"></cron-jobs>
<!-- To insert to in your component minimal config with reactive forms -->
<cron-jobs [formControl]="freqControl"></cron-jobs>
<!-- To insert to in your component minimal config with reactive forms -->
<!-- additional parameters -->
<cron-jobs [formControl]="freqControl" [config]="cronConfig" [validate]="cronValidate"></cron-jobs>
The component takes an attribute of config
This is an object in your controller you can use to remove options from the user. For example if you would like the user to be able to set Minute, Hour, and Day but not Week, Month, and Year you would create the following object in your controller:
{
quartz: true,
multiple: false,
options : {
minute : false
}
}
MIT © Daniel 'yp2' Derezinski
From angular 1 project
From angular2-cron-jobs project
From ngx-cron-jobs project