angular-momentjs-service
AngularJS Wrapper for Moment.js whithout registering it in the global scope.
How to use
-
Install angular-momentjs-service via bower:
bower install --save angular-momentjs-service
-
Include angular-momentjs-service into your project.
<script src="angular-momentjs-service.min.js"></script> -
Add
angular-momentjs
module in the dependencies of a angular module:angular.module('exampleApp', ['angular-momentjs']) -
Inject the MomentJS service into a controller, a directive, etc:
.controller('ExampleCtrl', ['$scope','MomentJS', function($scope, moment){$scope.now = moment();}]) -
Use the full MomentJS API as you wish.
How to test
Soon...
How to contribute
I am very glad to see this project living with pull requests.
LICENSE
Copyright (c) 2014 Igor Rafael
Licensed under the MIT license.