angular-input-interval
PEGjs based input interval. You can specify a time unit after a time value 'X', such as Xw, Xd, Xh, Xm or Xs, to represent weeks (w), days (d), hours (h), minutes (m) and seconds (s), respectively. interval will be available as milliseconds in the $scope of a controller.
This component is inspired by JIRA input interval component.
Demo page
Usage:
-
include as a dependency for your app.
angular.module('myApp', ['angular-input-interval'])
-
include the supplied JS file.
<script type='text/javascript' src='angular-input-interval.min.js'></script>
-
use it in your forms
<form> <input type="text" ng-model="interval" ng-interval> <label>Value in ms: </label> {{interval}} </form>
-
That's it -- you're done!
via bower:
$ bower install angular-input-interval
via npm:
$ npm install angular-input-interval
via maven/webjars:
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>angular-input-interval</artifactId>
<version>0.0.2</version>
</dependency>