-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trigger $digest loop when use finishCallback #273
Open
hjzheng
wants to merge
2
commits into
siddii:master
Choose a base branch
from
hjzheng:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "moment", | ||
"version": "2.9.0", | ||
"main": "moment.js", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"tasks", | ||
"component.json", | ||
"composer.json", | ||
"CONTRIBUTING.md", | ||
"ender.js", | ||
"Gruntfile.js", | ||
"package.js", | ||
"package.json" | ||
], | ||
"homepage": "https://github.com/moment/moment", | ||
"_release": "2.9.0", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "2.9.0", | ||
"commit": "8b35bc74c0e88c1a8c58ccb90117a9edc9f6a479" | ||
}, | ||
"_source": "https://github.com/moment/moment.git", | ||
"_target": "~2.9.0", | ||
"_originalSource": "moment" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>Moment.js</id> | ||
<version>2.8.4</version> | ||
<authors>Tim Wood</authors> | ||
<owners>Cory Deppen, Iskren Chernev</owners> | ||
<description>A lightweight javascript date library for parsing, manipulating, and formatting dates.</description> | ||
<releaseNotes> | ||
- Add LTS localised format that includes seconds | ||
- Added formatToken 'x' for unix offset in milliseconds #1938 | ||
- Support 24:00:00.000 to mean next day, at midnight. | ||
- Accept 'date' key when creating moment with object | ||
- Use native toISOString when we can | ||
- Some bugfixes and language improvements | ||
</releaseNotes> | ||
<projectUrl>http://momentjs.com/</projectUrl> | ||
<iconUrl>http://pbs.twimg.com/profile_images/482670411402858496/Xrtdc94q_normal.png</iconUrl> | ||
<licenseUrl>https://raw.github.com/timrwood/moment/master/LICENSE</licenseUrl> | ||
<tags>JavaScript date time browser node.js</tags> | ||
</metadata> | ||
<files> | ||
<file src="moment.js" target="Content\Scripts" /> | ||
<file src="min/moment.min.js" target="Content\Scripts" /> | ||
<file src="min/moment-with-locales.js" target="Content\Scripts" /> | ||
<file src="min/moment-with-locales.min.js" target="Content\Scripts" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] | ||
|
||
A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. | ||
|
||
## [Documentation](http://momentjs.com/docs/) | ||
|
||
## Upgrading to 2.0.0 | ||
|
||
There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes) | ||
|
||
* Changed language ordinal method to return the number + ordinal instead of just the ordinal. | ||
|
||
* Changed two digit year parsing cutoff to match strptime. | ||
|
||
* Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`. | ||
|
||
* Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`. | ||
|
||
* Removed the lang data objects from the top level namespace. | ||
|
||
* Duplicate `Date` passed to `moment()` instead of referencing it. | ||
|
||
## [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) | ||
|
||
## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md) | ||
|
||
## License | ||
|
||
Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE). | ||
|
||
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat | ||
[license-url]: LICENSE | ||
|
||
[npm-url]: https://npmjs.org/package/moment | ||
[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat | ||
[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat | ||
|
||
[travis-url]: http://travis-ci.org/moment/moment | ||
[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var Benchmark = require('benchmark'), | ||
moment = require("./../moment.js"), | ||
base = moment('2013-05-25'); | ||
|
||
module.exports = { | ||
name: 'clone', | ||
onComplete: function(){console.log('done');}, | ||
fn: function(){base.clone();}, | ||
async: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "moment", | ||
"version": "2.9.0", | ||
"main": "moment.js", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"tasks", | ||
"component.json", | ||
"composer.json", | ||
"CONTRIBUTING.md", | ||
"ender.js", | ||
"Gruntfile.js", | ||
"package.js", | ||
"package.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// moment.js locale configuration | ||
// locale : afrikaans (af) | ||
// author : Werner Mollentze : https://github.com/wernerm | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global | ||
} | ||
}(function (moment) { | ||
return moment.defineLocale('af', { | ||
months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), | ||
monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), | ||
weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), | ||
weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), | ||
weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), | ||
meridiemParse: /vm|nm/i, | ||
isPM : function (input) { | ||
return /^nm$/i.test(input); | ||
}, | ||
meridiem : function (hours, minutes, isLower) { | ||
if (hours < 12) { | ||
return isLower ? 'vm' : 'VM'; | ||
} else { | ||
return isLower ? 'nm' : 'NM'; | ||
} | ||
}, | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd, D MMMM YYYY LT' | ||
}, | ||
calendar : { | ||
sameDay : '[Vandag om] LT', | ||
nextDay : '[Môre om] LT', | ||
nextWeek : 'dddd [om] LT', | ||
lastDay : '[Gister om] LT', | ||
lastWeek : '[Laas] dddd [om] LT', | ||
sameElse : 'L' | ||
}, | ||
relativeTime : { | ||
future : 'oor %s', | ||
past : '%s gelede', | ||
s : '\'n paar sekondes', | ||
m : '\'n minuut', | ||
mm : '%d minute', | ||
h : '\'n uur', | ||
hh : '%d ure', | ||
d : '\'n dag', | ||
dd : '%d dae', | ||
M : '\'n maand', | ||
MM : '%d maande', | ||
y : '\'n jaar', | ||
yy : '%d jaar' | ||
}, | ||
ordinalParse: /\d{1,2}(ste|de)/, | ||
ordinal : function (number) { | ||
return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter | ||
}, | ||
week : { | ||
dow : 1, // Maandag is die eerste dag van die week. | ||
doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. | ||
} | ||
}); | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// moment.js locale configuration | ||
// locale : Moroccan Arabic (ar-ma) | ||
// author : ElFadili Yassine : https://github.com/ElFadiliY | ||
// author : Abdel Said : https://github.com/abdelsaid | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global | ||
} | ||
}(function (moment) { | ||
return moment.defineLocale('ar-ma', { | ||
months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | ||
monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | ||
weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | ||
weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), | ||
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd D MMMM YYYY LT' | ||
}, | ||
calendar : { | ||
sameDay: '[اليوم على الساعة] LT', | ||
nextDay: '[غدا على الساعة] LT', | ||
nextWeek: 'dddd [على الساعة] LT', | ||
lastDay: '[أمس على الساعة] LT', | ||
lastWeek: 'dddd [على الساعة] LT', | ||
sameElse: 'L' | ||
}, | ||
relativeTime : { | ||
future : 'في %s', | ||
past : 'منذ %s', | ||
s : 'ثوان', | ||
m : 'دقيقة', | ||
mm : '%d دقائق', | ||
h : 'ساعة', | ||
hh : '%d ساعات', | ||
d : 'يوم', | ||
dd : '%d أيام', | ||
M : 'شهر', | ||
MM : '%d أشهر', | ||
y : 'سنة', | ||
yy : '%d سنوات' | ||
}, | ||
week : { | ||
dow : 6, // Saturday is the first day of the week. | ||
doy : 12 // The week that contains Jan 1st is the first week of the year. | ||
} | ||
}); | ||
})); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to avoid this undocumented API usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, As far as I know It is a only way to detect whether the $digest loop is running.