Giter VIP home page Giter VIP logo

Comments (5)

jacobscarter avatar jacobscarter commented on July 26, 2024

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.

quantuminformation avatar quantuminformation commented on July 26, 2024

Cool thanks

from angular-cron-jobs.

menegazzo avatar menegazzo commented on July 26, 2024

I suggest a "more" Material template:

angular-cron-jobs-material

<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.

AntonisFK avatar AntonisFK commented on July 26, 2024

screen shot 2017-01-31 at 4 58 31 pm

Tried using your template but values are not showing up.


update: you need to add a s to the end of all the models and variables being ng-repreated

from angular-cron-jobs.

quantuminformation avatar quantuminformation commented on July 26, 2024

I haven't used angular in ages.

from angular-cron-jobs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.