Comments (5)
You can use angular material with the following html as a Custom Template as specified in the README.md file
<div class="cron-wrap">
<span>Every: </span>
<md-select class="cron-select" ng-model="myFrequency.base" aria-label="Select frequency type">
<md-option ng-value="opt.value" ng-repeat="opt in frequency">{{opt.label}}</md-option>
</md-select>
<span ng-show="myFrequency.base == 4"> on </span>
<md-select ng-show="myFrequency.base == 4" class="cron-select day-value" ng-model="myFrequency.dayValue" aria-label="Week number">
<md-option ng-value="opt" ng-repeat="opt in dayValue">{{opt | dayName}}</md-option>
</md-select>
<span ng-show="myFrequency.base >= 5"> on the </span>
<md-select ng-show="myFrequency.base >= 5" class="cron-select day-of-month-value" ng-model="myFrequency.dayOfMonthValue" aria-label="day of month">
<md-option ng-value="opt" ng-repeat="opt in dayOfMonthValue">{{opt | numeral}}</md-option>
</md-select>
<span ng-show="myFrequency.base == 6"> of </span>
<md-select ng-show="myFrequency.base == 6" class="cron-select month-value" ng-model="myFrequency.monthValue" aria-label="Month number">
<md-option ng-value="opt" ng-repeat="opt in monthValue">{{opt | monthName}}</md-option>
</md-select>
<span ng-show="myFrequency.base >= 2"> at </span>
<md-select ng-show="myFrequency.base >= 3" class="cron-select hour-value" ng-model="myFrequency.hourValue" aria-label="hour">
<md-option ng-value="opt" ng-repeat="opt in hourValue">{{opt}}</md-option>
</md-select>
<span ng-show="myFrequency.base >= 3"> : </span>
<md-select ng-show="myFrequency.base >= 2" class="cron-select minute-value" ng-model="myFrequency.minuteValue" aria-label="minute">
<md-option ng-value="opt" ng-repeat="opt in minuteValue">{{opt}}</md-option>
</md-select>
<span ng-show="myFrequency.base == 2"> past the hour</span>
</div>
from angular-cron-jobs.
Cool thanks
from angular-cron-jobs.
I suggest a "more" Material template:
<div layout="row">
<md-input-container flex>
<label>Every</label>
<md-select ng-model="myFrequency.base">
<md-option ng-value="item.value" ng-repeat="item in frequency">{{item.label}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base == 4" flex>
<label>on</label>
<md-select ng-model="myFrequency.dayValue">
<md-option ng-value="value" ng-repeat="value in dayValue">{{value | cronDayName}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base >= 5" flex>
<label>on the</label>
<md-select ng-model="myFrequency.dayOfMonthValue">
<md-option ng-value="value" ng-repeat="value in dayOfMonthValue">{{value | cronNumeral}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base == 6" flex>
<label>on</label>
<md-select ng-model="myFrequency.monthValue">
<md-option ng-value="value" ng-repeat="value in monthValue">{{value | cronMonthName}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base >= 3" flex>
<label>at hour</label>
<md-select ng-model="myFrequency.hourValue">
<md-option ng-value="value" ng-repeat="value in hourValue">{{value}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base >= 3" flex>
<label>and minute</label>
<md-select ng-model="myFrequency.minuteValue">
<md-option ng-value="value" ng-repeat="value in minuteValue">{{value}}</md-option>
</md-select>
</md-input-container>
<md-input-container ng-show="myFrequency.base == 2" flex>
<label>at minute</label>
<md-select ng-model="myFrequency.minuteValue">
<md-option ng-value="value" ng-repeat="value in minuteValue">{{value}}</md-option>
</md-select>
</md-input-container>
</div>
from angular-cron-jobs.
update: you need to add a s to the end of all the models and variables being ng-repreated
from angular-cron-jobs.
I haven't used angular in ages.
from angular-cron-jobs.
Related Issues (20)
- How would i convert the output string to ISO 8601 syntax format HOT 1
- "config" is not working HOT 3
- could you support the case "every 5minutes"? HOT 7
- Support every 2,3,4 days HOT 1
- Could you support empty selection HOT 1
- v2.0.0 broke init functionality HOT 2
- weird behavior when re-selecting base HOT 4
- supports events HOT 6
- Support for disabled controls? HOT 3
- Demo is down? HOT 2
- Translate month and weekdays HOT 2
- OUTPUT: 10 * * * NaN HOT 3
- Integration with the latest Angular 2 Applications HOT 2
- value.forEach is not a function HOT 3
- How would you disable the input fields while not using editMode ? HOT 3
- Incorrect count of days in month HOT 2
- Bower.json dependency problem HOT 1
- how can i add 'custom' in drop-down.
- Scope parameter value not passing plz help
- Fix incompatible for...in loop over array instead of an object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-cron-jobs.