Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #235 from kylecannon/master
Browse files Browse the repository at this point in the history
Add moment-timezone documentation for use with webpack
  • Loading branch information
urish committed Mar 22, 2016
2 parents c3f3361 + 4b315a6 commit 412f375
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ You can choose your preferred method of installation:
* From a CDN: [jsDelivr](https://cdn.jsdelivr.net/angular.moment/1.0.0-beta.5/angular-moment.min.js) or [CDNJS](https://cdnjs.cloudflare.com/ajax/libs/angular-moment/1.0.0-beta.5/angular-moment.min.js)
* Download from github: [angular-moment.min.js](https://raw.github.com/urish/angular-moment/master/angular-moment.min.js)


Instructions for using moment-timezone with webpack
----------

Even if you have `moment-timezone` in your `package.json`, `angular-moment` will not be able to use it unless you override
moment using Angular's dependency injection [See Resolved Issue](https://github.com/urish/angular-moment/pull/234)

```javascript
var angular = require('angular');
require('angular-moment');
var ngModule = anglar.module('ngApp',['angularMoment']);
ngModule.constant('moment', require('moment-timezone'));
```


Usage
-----
Include both **moment.js** and **angular-moment.js** in your application.
Expand Down

0 comments on commit 412f375

Please sign in to comment.