0.1.1 • Published 10 years ago
angular-period v0.1.1
angular-period
AngularJS directive for switching the DOM in the period.
Installation
use bower:
bower install --save angular-perioduse npm:
npm install --save angular-periodUsage
Include angular-period with angular in your application.
<script src="/js/angular.min.js"></script>
<script src="/js/angular-period.min.js"></script>Add the module angularPeriod as a dependency to your app module.
angular.module('app', ['angularPeriod']);Add the directive in your module.
<body>
<div ng-period ng-period-start="'2015-06-22T00:00:00'" ng-period-end="'2015-06-29T23:59:59'">
<div ng-period-when="previous">
<p>The previous period when this section is displayed.</p>
</div>
<div ng-period-when="during">
<p>The duration when this section is displayed.</p>
</div>
<div ng-period-when="after">
<p>The after period when this section is displayed.</p>
</div>
</div>
</body>About date parsing
ngPeriod dosen't support date string parsing.
If you seek safety, please specify the Date Object or momentjs etc.
Date class that compatible with the library in ngperiod.
LICENSE
MIT