rvalenciano / ngx-cron-jobs-orig

Angular > 2 version of angular-cron-jobs.
https://yp2.github.io/ngx-cron-jobs/
9 stars 10 forks source link

Add ability to load an existing cron expression and render it #20

Closed LBoraz closed 4 years ago

LBoraz commented 6 years ago

the component will create the correct cron expression but it's able to display an already generated one. Say you have this expression:

0 15 * ?

and bind that value to the component with ngModel, the component will display a blank dropdown. Basically one can only create new expressions and not display previously created ones

rvalenciano commented 6 years ago

So @LBoraz you're talking about reversing the process? You put an already existing cron expression and you want to fill the dropdown according to it?

LBoraz commented 6 years ago

yes, i'd like to provide an already existing expression (generated with the component) through ngModel. In my case i have a form that allows to configure schedules (one attribute of the schedule is the cron expr), and the second time (when the schedule has already been saved and someone wants to edit it) it would be nice to get the dropdowns set correctly so that the user can read back the expression he saved (in a non-techy format).

LBoraz commented 6 years ago

if you tell me what place in the code would need to be changed to support this, i can probably find the time to do the change myself and submit a pull request.

sudhakar-sekar commented 5 years ago

@LBoraz Please use [validate]="true" to load on existing CRON expression.

rvalenciano commented 4 years ago

Will close issue, new repo project can be found https://github.com/yp2/ngx-cron-jobs