| Age | Commit message (Collapse) | Author |
|
values to trigger animations
Closes #5357
Closes #5283
|
|
It is essential that users of `$interval` destroy the interval when they are finished.
Otherwise you can get memory leaks.
Often `$intervals` are used in directives or controllers and developers don't think
about what happens when the component is destroyed.
If a directive/controller scope is destroyed, then the $interval should be destroyed as well.
This could cause some issues with developers who assume that the interval will be cleared
for them when the scope is destroyed.
Closes #5377
I believe that the library could/should handle this as well, but thats another issue.
|
|
Closes #5374
|
|
Closes #5361
|
|
Closes #5338
|
|
It appears that this exceptional case was only valid for IE<8 and that for IE>=8 it
was actually causing a bug with the `ng-href-attr` directive on `<a>` elements.
Closes #5479
|
|
Prior to this fix, $parse/$eval would return 'null' if a middle key in
an expression's value is null, when it should be expected to be undefined.
This patch tries to remedy this by returning undefined for middle values in
expressions, when fetching a child of that null value.
For example:
```js
// Given the following object:
$scope.a = {
b: null
};
// $scope.$eval('a.b.c') returns undefined, whereas previously it would return null
```
Closes #5480
|
|
In IE8, reading `console.log.apply` throws an error.
Catching this errow now.
Fixes #5400. Fixes #5147.
|
|
Before this fix, the xlink:href property of an SVG <a> element could not be parsed
on click, as the property is an SVGAnimatedString rather than a DOMString.
This patch parses the xlink:href's animVal into a DOMString in order to prevent
an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown,
and also to update the location if necessary as expected.
Closes #5472
Closes #5198
Closes #5199
Closes #4098
Closes #1420
|
|
Use a faster path when the number of path tokens is low (ie the common case).
This results in a better than 19x improvement in the time spent in $parse and
produces output that is about the same speed in chrome and substantially faster
in firefox.
http://jsperf.com/angularjs-parse-getter/6
Closes #5359
|
|
Add class ng-scope to dom nodes during directive compile rather than link.
Optimize handling of nodeLists.
This results in a savings of about 130ms during the startup of a product within Google.
Closes #5471
|
|
Closes #5343
|
|
Closes #5310
|
|
Workaround for chrome for android until #2129 is ready.
Closes #5308, #5323
|
|
|
|
End 2 end tests wait for all `$timeout`s to be run before completing the test.
This was problematic where we were using timeouts that restarted themselves because
there would never be a point when all timeouts had completed, causing the tests to hang.
To fix this $timeout had been monkey-patched but this caused other issue itself.
Now that we have $interval we don't need to use $timeout handlers that re-trigger the $timeout
so we can ditch the monkey-patch.
This commit tidies up any examples that are using this approach and changes them to use $interval
instead.
Closes #5232
|
|
When `multiple` attribute is set on a `<select>` control and the model value is an empty array,
we should invalidate the control. Previously, this directive was using incorrect logic for
determining if the model was empty.
Closes #5337
|
|
We cannot use valid /* ... */ CSS comments in examples because they break the parsing
of the ngdoc comments. We can't use inline // comments because these are not valid in
CSS.
We could use the //!annotate extension to the ngdoc parser but this does not seem to be
working. It is best to simply remove this line.
Closes #5234
|
|
allow and pass through new line characters when checking passed in expression
Closes #5000
|
|
jQuery's elem.html('') is way slower than elem.empty(). As clearing
element contents happens quite often in certain scenarios, switching
to using .empty() provides a significant performance boost when using
Angular with jQuery.
Closes #4457
|
|
Change the a directive to link and hookup a click event only when
there is no href or name in the template element.
In a large Google app, this results in about 800 fewer registrations,
saving a small but measurable amount of time and memory.
Closes #5362
|
|
The template needs to be added to the DOM before
other directives at the same element as `ngInclude` are linked.
Fixes #5247.
|
|
When a component uses an isolate scope reference
and the the component is used with an object literal
a new object is created on every evaluation.
Therefore the compiler needs to compare
the values of the parent and the isolate scope
using object equality and not object reference
equality.
Fixes #5296.
|
|
Closes #5285
|
|
Also added a note to the Writing AngularJS Documentation:
https://github.com/angular/angular.js/wiki/Writing-AngularJS-Documentation/d0c715ef89
Closes #5261
|
|
Closes #5257
|
|
Closes #5230
|
|
If an element has a directive whose content is loaded using `templateUrl`,
and the element is cloned using a linking function before the template arrives,
the clone needs to be updated as well.
This also updates `ngIf` and `ngRepeat` to keep the connection to the clone
of a tranclude function, so that they know about the changes a directive with
`templateUrl` does to the element in the future.
Fixes to #4930.
|
|
Stop dirty-checking during $digest after the last dirty watcher has been re-checked.
This prevents unneeded re-checking of the remaining watchers (They were already
checked in the previous iteration), bringing a substantial performance improvement
to the average case run time of $digest.
Closes #5272
Closes #5287
|
|
The priority of ngInit is adjusted to occur before ngInclude, and after
ngController. This enables ngInit to initiallize values in a controller's
scope, and also to initiallize values before ngInclude executes.
Closes #5167
Closes #5208
|
|
Due to an earlier change, ngModelWatch() no longer returns a value to the
caller. This means the digest loop has no way to tell if the watch actually
modified anything and so can not schedule another pass.
This means any watches that watch form or model controller changes
(e.g. watches on form.$valid) that are scheduled prior to an ngModelWatch()
will not be able to see any changes made therin.
This commit fixes this behavior by returning the latest evaluated ng-model
value.
Closes #5258
Closes #5282
|
|
Fixes #5169
|
|
Closes #5186
|
|
The 1.2 release fixed the documented pitfall at 909cabd36d779598763cc358979ecd85bb40d4d7
by isolating only the isolated directive's scope.
Closes #5179
|
|
Add calls to clearPhase() when an exception is raised by a watcher
while a digest cycle, in order to not be stuck on `$digest` scope phase
|
|
When using two-way binding with isolate scope, under some circumstances
the lastValue variable captured in the parentValueWatch function can get
out of sync.
Specifically, if both the value in the origin scope as well as the value
in the isolate scope get independently updated to the same value within
one digest cycle, the lastValue is never updated. This potentially causes
the watch to make the wrong decision as to which side to update on subsequent
passes.
This fixes things by ensuring lastValue is always set to the last seen
value even if the watch's logic was short circuited because there was no
difference between the values in the original and isolate scopes.
Closes #5182
|
|
|
|
This change makes it easier to debug angular, especiall when dealing with heap snapshots
and hunting for memory leaks.
|
|
This version matches the "alternate 2.2" version here: http://jsperf.com/ensuresafeobject/2
alternate 2.3 is a bit faster and simpler, but would break backwards compatibility.
Closes #5246
|
|
|
|
As requested by a top-rated Disqus comment: http://docs.angularjs.org/api/ng.directive:form.FormController#comment-655325797
Closes #5121
|
|
Move use of `$window` from template to controller, because accessing `$window`
in expressions is now disallowed and doesn't work.
Closes #5110
|
|
The urlResolve method was fixed to automatically remove the
volume label from path names to fix issues with the file
protocol on windows where $location.path() was returning
paths where the first segment would be the volume name,
such as "/C:/mypath". See #4942 and #4928
However, the solution was specific to the $location non-
HTML5 mode, and was implemented at a lower level of
abstraction than it should have been. This refactor moves
the fix to inside of the LocationHashBangUrl $$parse method.
Closes #5041
|
|
`$sanitize` now uses the same mechanism as `$compile` to validate uris.
By this, the validation in `$sanitize` is more general and can be
configured in the same way as the one in `$compile`.
Changes
- Creates the new private service `$$sanitizeUri`.
- Moves related specs from `compileSpec.js` into `sanitizeUriSpec.js`.
- Refactors the `linky` filter to be less dependent on `$sanitize`
internal functions.
Fixes #3748.
|
|
apps
Previously if an app was running from file:// origin we would always return either
http 200 or 404 depending on whether the response was present.
This changes the behavior so that we do this only if the protocol of the request
(not the origin) is file:// and only if the status code is 0.
Closes #4436
Closes #4587
Closes #4514
|
|
Closes #5133
|
|
Although modern browser support the "input" event, they still only fire
the "change" event when they auto complete form elements
other than the currently selected one.
Related to #1460
|
|
|
|
IE8, IE9 and IE10 can use `script.onreadystate` so up till now we have been using this
if the sniffer says we are on IE.
But IE11 now does not support `script.onreadystate` and only supports the more standard
`script.onload` and `script.onerror`.
IE9 and IE10 do support `script.onload` and `script.onerror`. So now we only test whether
we are on IE8 or earlier before using `script.onreadystate`.
See http://pieisgood.org/test/script-link-events/
jQuery just uses all these handlers at once and hopes for the best, but since IE9 and IE10
support both sets of handlers, this could cause the handlers to be run more than once.
jQuery also notes that there is a potential memory leak in IE unless we remove the handlers
from the script object once they are run. So we are doing this too, now.
Closes #4523
Closes #4527
Closes #4922
|
|
Previously, when unwrapping promises was set to `true`,
an error would occur if a parsed expression had a
new line in it.
This was because when generating the `evaledFnGetter` code,
a new line in an parsed expression would create a new line
in a JS string in that code, which is illegal. That is:
```js
pw("A+
B")
```
Closes #4718
|