Permalink
Comparing changes
Open a pull request
7
contributors
Commits on Jan 08, 2016
Commits on Jan 09, 2016
Commits on Jan 11, 2016
Includes the following fixes (per component):
* `$sniffer`: Properly determine the expected `vendorPrefix` for MS Edge
* `input`: MS Edge does not support dates with years with more than 4 digits.
Trying to set the value of an `input[datetime-local]` to `9999-12-31T23.59.59.999` throws an
error (probably related to converting the date to one with a year with more than 4 digits,
due to timezone offset).
* `$animateCss`: Although the detected `vendorPrefix` for MS Edge is "ms", it doesn't seem to
recognize some vendor-prefixed CSS rules (e.g. `-ms-animation-*`). Other browsers (currently)
recognize either vendor-prefixed rules only or both.
Fixed by adding and retrieving styles using both prefixed and un-prefixed names.
* `$compile`: Skip failing `foreignObject` test on MS Edge.
For unknown reasons, an `<svg>` element inside a `<foreignObject>` element on MS Edge has no
size, causing the included `<circle>` element to also have no size and thus fails an
assertion (relying on the element having a non-zero size).
This seems to be an MS Edge issue; i.e. it is also reproducible without Angular.
(Tested with MS Edge version 25.10586.0.0 on Windows 10.)
Closes #13686
Commits on Jan 12, 2016
As discussed in #13664 (comment). Closes #13736
A bug in material has exposed that ngAnimate makes a copy of the provided animation options twice. By making two copies, the same DOM operations are performed during and at the end of the animation. If the CSS classes being added/ removed contain existing transition code, then this will lead to rendering issues. Closes #13722 Closes #13578
Add warning about the possible consequences of a forced push Closes #13747
Commits on Jan 13, 2016
These doc types do not contain useful information from the point of view of search results and are making the results less clear
Commits on Jan 17, 2016
Prior to this fix, ngAnimate would always trigger animations even if the browser tab or browser window was not visible. This would cause issues with class updates / DOM operations even if elements were not using animations. The root cause is that browsers do not flush calls to requestAnimationFrame when browser windows / tabs are not visible. This fix disables animations if `document.hidden` is `true`. Closes #12842 Closes #13776
Commits on Jan 19, 2016
This commit fixes two bugs: 1) Previously, animate would assume that a found host element was part of the $rootElement (while it's possible that it is also outside the root). 2) Previously, if a parent of the animated element was pinned to a host element, the host would not be checked regarding animations enabled status etc. Closes #13783
This commit speeds up the code that checks if an element can be animated, for the following two cases: The checks will be sped up in cases where the animation is disabled via $animate.enabled(element, false) on any parent element. A minor speed-up is also included for cases where the $rootElement of the app (the bootstrap element) is on the body or lower in the DOM tree.
Unified
Split
Showing
with
4,319 additions
and 2,246 deletions.
- +7 −1 CONTRIBUTING.md
- +4 −0 docs/config/index.js
- +27 −20 docs/config/processors/keywords.js
- +28 −0 docs/content/error/ngModel/nopromise.ngdoc
- +1 −1 docs/content/tutorial/step_00.ngdoc
- +1,300 −728 npm-shrinkwrap.clean.json
- +2,229 −1,325 npm-shrinkwrap.json
- +9 −9 package.json
- +2 −1 src/Angular.js
- +2 −0 src/AngularPublic.js
- +21 −4 src/ng/animate.js
- +8 −4 src/ng/animateCss.js
- +19 −4 src/ng/animateRunner.js
- +11 −4 src/ng/compile.js
- +1 −1 src/ng/controller.js
- +1 −1 src/ng/directive/ngModel.js
- +11 −9 src/ngAnimate/animateCss.js
- +28 −5 src/ngAnimate/animateJs.js
- +42 −23 src/ngAnimate/animateQueue.js
- +82 −4 src/ngMock/angular-mocks.js
- +25 −4 test/AngularSpec.js
- +13 −2 test/helpers/privateMocks.js
- +1 −1 test/helpers/privateMocksSpec.js
- +22 −0 test/ng/animateCssSpec.js
- +37 −0 test/ng/animateRunnerSpec.js
- +16 −11 test/ng/compileSpec.js
- +11 −0 test/ng/controllerSpec.js
- +1 −1 test/ng/directive/inputSpec.js
- +1 −1 test/ng/directive/ngListSpec.js
- +1 −1 test/ng/directive/ngModelSpec.js
- +2 −2 test/ng/directive/ngRepeatSpec.js
- +3 −1 test/ng/snifferSpec.js
- +2 −2 test/ngAnimate/animateCssDriverSpec.js
- +79 −49 test/ngAnimate/animateCssSpec.js
- +138 −22 test/ngAnimate/animateSpec.js
- +49 −2 test/ngAnimate/integrationSpec.js
- +85 −3 test/ngMock/angular-mocksSpec.js
| @@ -123,13 +123,19 @@ Before you submit your pull request consider the following guidelines: | ||
| * If we suggest changes then: | ||
| * Make the required updates. | ||
| * Re-run the Angular test suite to ensure tests are still passing. | ||
| * Rebase your branch and force push to your GitHub repository (this will update your Pull Request): | ||
| * Commit your changes to your branch (e.g. `my-fix-branch`). | ||
| * Push the changes to your GitHub repository (this will update your Pull Request). | ||
|
|
||
| If the PR gets too outdated we may ask you to rebase and force push to update the PR: | ||
|
|
||
| ```shell | ||
| git rebase master -i | ||
| git push origin my-fix-branch -f | ||
| ``` | ||
|
|
||
| *WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments | ||
| on code that were previously made by you and others in your commits.* | ||
|
|
||
| That's it! Thank you for your contribution! | ||
|
|
||
| #### After your pull request is merged | ||
| @@ -170,4 +170,8 @@ module.exports = new Package('angularjs', [ | ||
| jqueryDeployment, | ||
| productionDeployment | ||
| ]; | ||
| }) | ||
|
|
||
| .config(function(generateKeywordsProcessor) { | ||
| generateKeywordsProcessor.docTypesToIgnore = ['componentGroup']; | ||
| }); | ||
| @@ -16,9 +16,11 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) { | ||
| ignoreWordsFile: undefined, | ||
| areasToSearch: ['api', 'guide', 'misc', 'error', 'tutorial'], | ||
| propertiesToIgnore: [], | ||
| docTypesToIgnore: [], | ||
| $validate: { | ||
| ignoreWordsFile: { }, | ||
| areasToSearch: { presence: true }, | ||
| docTypesToIgnore: { }, | ||
| propertiesToIgnore: { } | ||
| }, | ||
| $runAfter: ['memberDocsProcessor'], | ||
| @@ -28,6 +30,7 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) { | ||
| // Keywords to ignore | ||
| var wordsToIgnore = []; | ||
| var propertiesToIgnore; | ||
| var docTypesToIgnore; | ||
| var areasToSearch; | ||
|
|
||
| // Keywords start with "ng:" or one of $, _ or a letter | ||
| @@ -47,6 +50,8 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) { | ||
| areasToSearch = _.indexBy(this.areasToSearch); | ||
| propertiesToIgnore = _.indexBy(this.propertiesToIgnore); | ||
| log.debug('Properties to ignore', propertiesToIgnore); | ||
| docTypesToIgnore = _.indexBy(this.docTypesToIgnore); | ||
| log.debug('Doc types to ignore', docTypesToIgnore); | ||
|
|
||
| var ignoreWordsMap = _.indexBy(wordsToIgnore); | ||
|
|
||
| @@ -78,34 +83,36 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) { | ||
|
|
||
| // We are only interested in docs that live in the right area | ||
| docs = _.filter(docs, function(doc) { return areasToSearch[doc.area]; }); | ||
| docs = _.filter(docs, function(doc) { return !docTypesToIgnore[doc.docType]; }); | ||
|
|
||
| _.forEach(docs, function(doc) { | ||
|
|
||
| var words = []; | ||
| var keywordMap = _.clone(ignoreWordsMap); | ||
| var members = []; | ||
| var membersMap = {}; | ||
|
|
||
| // Search each top level property of the document for search terms | ||
| _.forEach(doc, function(value, key) { | ||
| var words = []; | ||
| var keywordMap = _.clone(ignoreWordsMap); | ||
| var members = []; | ||
| var membersMap = {}; | ||
|
|
||
| if ( _.isString(value) && !propertiesToIgnore[key] ) { | ||
| extractWords(value, words, keywordMap); | ||
| } | ||
| // Search each top level property of the document for search terms | ||
| _.forEach(doc, function(value, key) { | ||
|
|
||
| if ( key === 'methods' || key === 'properties' || key === 'events' ) { | ||
| _.forEach(value, function(member) { | ||
| extractWords(member.name, members, membersMap); | ||
| }); | ||
| } | ||
| }); | ||
| if ( _.isString(value) && !propertiesToIgnore[key] ) { | ||
| extractWords(value, words, keywordMap); | ||
| } | ||
|
|
||
| if ( key === 'methods' || key === 'properties' || key === 'events' ) { | ||
| _.forEach(value, function(member) { | ||
| extractWords(member.name, members, membersMap); | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
|
|
||
| doc.searchTerms = { | ||
| titleWords: extractTitleWords(doc.name), | ||
| keywords: _.sortBy(words).join(' '), | ||
| members: _.sortBy(members).join(' ') | ||
| }; | ||
| doc.searchTerms = { | ||
| titleWords: extractTitleWords(doc.name), | ||
| keywords: _.sortBy(words).join(' '), | ||
| members: _.sortBy(members).join(' ') | ||
| }; | ||
|
|
||
| }); | ||
|
|
||
| @@ -0,0 +1,28 @@ | ||
| @ngdoc error | ||
| @name ngModel:nopromise | ||
| @fullName No promise | ||
| @description | ||
|
|
||
| The return value of an async validator, must always be a promise. If you want to return a | ||
| non-promise value, you can convert it to a promise using {@link ng.$q#resolve `$q.resolve()`} or | ||
| {@link ng.$q#reject `$q.reject()`}. | ||
|
|
||
| Example: | ||
|
|
||
| ``` | ||
| .directive('asyncValidator', function($q) { | ||
| return { | ||
| require: 'ngModel', | ||
| link: function(scope, elem, attrs, ngModel) { | ||
| ngModel.$asyncValidators.myAsyncValidation = function(modelValue, viewValue) { | ||
| if (/* I don't need to hit the backend API */) { | ||
| return $q.resolve(); // to mark as valid or | ||
| // return $q.reject(); // to mark as invalid | ||
| } else { | ||
| // ...send a request to the backend and return a promise | ||
| } | ||
| }; | ||
| } | ||
| }; | ||
| }) | ||
| ``` |
| @@ -11,7 +11,7 @@ the AngularJS phonecat app. You will also learn how to start the development ser | ||
| angular-seed, and run the application in the browser. | ||
|
|
||
| Before you continue, make sure you have set up your development environment and installed all necessary | ||
| dependencies, as described in {@link tutorial/index#get-started Get Started}. | ||
| dependencies, as described in {@link index#get-started Get Started}. | ||
|
|
||
| In the `angular-phonecat` directory, run this command: | ||
|
|
||
Oops, something went wrong.