Changelog History
Page 15
-
v1.2.8 Changes
January 10, 2014π Bug Fixes
- $http:
- $location: return '/' for root path in hashbang mode (63cd873f, #5650, #5712)
- π $parse: fix CSP nested property evaluation, and issue that prevented its tests from failing (3b1a4fe0, #5591, #5592)
- closure: add Closure externs for angular.$q.Promise.finally (caeb7402, #4757)
- ngMock window.inject: Remove Error 'stack' property changes (7e916455)
π Features
-
v1.2.7 Changes
January 03, 2014π Bug Fixes
- $animate:
- $http: (3d38fff8)
- $injector: remove the
INSTANTIATING
flag properly when done (186a5912, #4361, #5577) - $location:
- $resource: prevent URL template from collapsing into an empty string (131e4014, #5455, #5493)
- $sanitize: consider the
size
attribute as a valid/allowed attribute (056c8493, #5522) - Scope: don't let watch deregistration mess up the dirty-checking digest loop (884ef0db, #5525)
- input:
- ngRepeat: allow for more flexible coding style in ngRepeat expression (c9705b75, #5537, #5598)
- ngRoute: instantiate controller when template is empty (498365f2, #5550)
- ngShow/ngHide, ngIf: functions with zero args should be truthy (01c5be46, #5414)
π Performance Improvements
-
v1.2.6 Changes
December 19, 2013π Bug Fixes
- $animate: use a scheduled timeout in favor of a fallback property to close transitions (54637a33, #5255, #5241, #5405)
- $compile: remove invalid IE exceptional case for
href
(c7a1d1ab, #5479) - $location: parse xlink:href for SVGAElements (bc3ff2ce, #5472, #5198, #5199, #4098, #1420)
- π² $log: should work in IE8 (4f5758e6, #5400)
- π $parse: return
undefined
if an intermediate property's value isnull
(26d43cac, #5480) - closure: add type definition for
Scope#$watchCollection
(8f329ffb, #5475) - forEach: allow looping over result of
querySelectorAll
in IE8 (274a6734) - input: do not hold input for composition on Android (3dc18037, #5308)
- jqLite: support unbind self within handler (2f91cfd0)
- ngRepeat: allow multiline expressions (cbb3ce2c, #5000)
- select: invalidate when
multiple
,required
, and model is[]
(5c97731a, #5337)
π Features
- jqLite: provide support for
element.one()
(937caab6) - ngAnimate: provide configuration support to match specific className values to trigger animations (cef084ad, #5357, #5283)
π Performance Improvements
-
v1.2.5 Changes
December 13, 2013π Bug Fixes
- $compile: allow literals in isolate scope references (43072e38, #5296)
- π€‘ angular-mocks: use copy of mock data in $httpBackend (f69dc162)
- closure: add missing FormController extern definitions (1d5e18b0, #5303)
- ngInclude: add template to DOM before linking other directives (30a8b7d0, #5247)
- ngView: add template to DOM before linking other directives (f8944efe)
π Performance Improvements
- $injector: remove invoke optimization that doesn't work (05e4fd34, #5388)
- $resource: use shallow copy instead of angular.copy (fcd2a813, #5300)
- a: do not link when href or name exists in template (f3de5b6e, #5362)
- jqLite: implement and use the
empty
method in place ofhtml(ββ)
(3410f65e, #4457)
π₯ Breaking Changes
- π€‘ angular-mocks: due to f69dc162,
some tests that rely on identity comparison rather than equality comparison in checking mock http responses will be broken,
since now each mock response is a copy of the original response. This is usually fixable by changing a
.toBe()
comparison totoEqual()
inside of tests.
-
v1.2.4 Changes
December 06, 2013π Bug Fixes
- $animate:
- $compile:
- $rootScope:
- $sanitize: don't rely on YARR regex engine executing immediately in order to prevent object mutation (81b81856, #5193, #5192)
- closure: closure compiler shouldn't rename .defaults.transformRequest (f01087f8)
- input: ensure ngModelWatch() triggers second digest pass when appropriate (b6d54393, #5258, #5282)
- isElement: return boolean value rather than
truthy
value. (2dbb6f9a, #4519, #4534) - jqLite: ignore incompatible nodes on find() (1169b544, #4120)
- ngInit: evaluate ngInit before ngInclude (0e50810c, #5167, #5208)
- ngSanitize: prefer textContent to innerText to avoid layout trashing (bf1972dc)
π Performance Improvements
-
v1.2.3 Changes
November 27, 2013π Bug Fixes
- $animate:
- ensure blocked keyframe animations are unblocked before the DOM operation (2efe8230, #5106)
- ensure animations are disabled during bootstrap to prevent unwanted structural animations (eed23332, #5130)
- $sanitize: use the same whitelist mechanism as
$compile
does (33352348, #3748) - input: react to form auto completion, through the
change
event, on modern browsers (a090400f, #1460) - $attrs: add
$attrs.$attr
to externs so that it isn't renamed on js minification (bcca8054)
π Features
π No new features in this release
π₯ Breaking Changes
π There are no breaking changes in this release (promise!)
-
v1.2.2 Changes
November 22, 2013π Bug Fixes
- $animate:
- ensure keyframe animations are blocked around the reflow (6760d7a3, #5018)
- ensure transition animations are unblocked before the dom operation occurs (062fbed8, #5014, #4265)
- ensure addClass/removeClass animations do not snap during reflow (76e4db6f, #4892)
- ensure the DOM operation isn't run twice (7067a8fb, #4949)
- $compile:
- $httpBackend: only IE8 and below can't use
script.onload
for JSONP (a3172a28, #4523, #4527, #4922) - π $parse: allow for new lines in expr when promise unwrapping is on (40647b17, #4718)
- $resource: Always return a resource instance when calling class methods on resources. (f6ecf9a3, #4545, #5061)
- httpBackend: should not read response data when request is aborted (6f1050df, #4913, #4940)
- loader: expose
$$minErr
to modules such asngResource
(9e89a31b, #5050) - ngAnimate:
- ngClass: ensure that ngClass only adds/removes the changed classes (6b8bbe4d, #4960, #4944)
- ngController: fix issue with ngInclude on the same element (6288cf5c, #4431)
- ngInclude:
- ngMock: fixes httpBackend expectation with body object (4d16472b, #4956)
- ngView: Don't throw when the ngView element contains content with directives. (e6521e74, #5069)
- β tests: Correct tests for IE11 (57924234, #5046)
- input: hold listener during text composition (a4e6d962, #4684)
- $animate:
-
v1.2.1 Changes
November 14, 2013π Bug Fixes
- $compile:
- $resource: don't use $parse for @dotted.member (9577702e)
- bootstrap: make IE8 happy (a61b65d0)
- loader: don't rely on internal APIs (8425e9fe, #4437, #4874)
- minErr: remove references to internal APIs (94764ee0)
- ngIf: don't create multiple elements when changing from a truthy value to another truthy value (4612705e, #4852)
- urlUtils:
π Features
-
v1.2.0 Changes
November 08, 2013π Features
- animations:
- π $parse: secure expressions by hiding "private" properties (3d6a89e8)
- π docs:
- jqLite: expose isolateScope() getter similar to scope() (27e9340b)
- misc: add externs file for Closure Compiler (9d0a6977)
π Bug Fixes
- $animate:
- don't force animations to be enabled (98adc9e0)
- only apply the fallback property if any transition animations are detected (94700807)
- avoid hanging animations if the active CSS transition class is missing (b89584db, #4732, #4490)
- ensure staggering animations understand multiple delay values (41a2d5b3)
- ensure the active class is not applied if cancelled during reflow (e53ff431, #4699)
- use direct DOM comparison when checking for $rootElement (d434eabe, #4679)
- ensure former nodes are fully cleaned up when a follow-up structural animation takes place (7f0767ac, #4435)
- ensure enable/disable animations work when the document node is used (6818542c, #4669)
- skip unnecessary addClass/removeClass animations (76b628bc, #4401, #2332)
- ensure animations work properly when the $rootElement is being animated (2623de14, #4397, #4231)
- only cancel class-based animations if the follow-up class contains CSS transition/keyframe animation code (f5289fe8, #4463, #3784)
- $compile:
- don't leak isolate scope state when replaced directive is used multiple times (b5af198f)
- correct isolate scope distribution to controllers (3fe4491a)
- replaced element has isolate scope (97c7a4e3)
- only pass isolate scope to children that belong to the isolate directive (d0efd5ee)
- make isolate scope truly isolate (909cabd3, #1924, #2500)
- don't instantiate controllers twice for element transclude directives (18ae985c, #4654)
- attribute bindings should not break due to terminal directives (79223eae, #4525, #4528, #4649)
- instantiate controllers when re-entering compilation (faf5b980, #4434, #4616)
- $injector: allow a constructor function to return a function (c22adbf1)
- π $parse: check function call context to be safe (6d324c76, #4417)
- π€‘ angular-mocks: add inline dependency annotation (6d23591c, #4448)
- animateSpec: run digest to enable animations before tests (aea76f0d)
- bootstrap-prettify: share $animate and $$postDigestQueue with demo apps (1df3da36)
- csp:
- docModuleComponents: implement anchor scroll when content added (eb51b024, #4703)
- input: keep track of min/max attars on-the-fly (4b653aea)
- ngAnimate: fix cancelChildAnimations throwing exception (b9557b0a, #4548)
- ngClassSpec: clear animation enable fn from postDigestQueue (ffa9d0a6)
- ngEventDirectives: parse expression only once during compile phase. (9a828738)
- ngIf:
- ngInclude: only run anchorScroll after animation is done (d378f550, #4723)
- ngMock: throw more descriptive errors for $animate.flushNext() (6fb19157)
- ngModel: deregister from the form on scope not DOM destruction (8f989d65, #4226, #4779)
- ngScenario: correctly disable animations for end 2 end tests (9d004585)
- ngView:
- ngdocs:
π₯ Breaking Changes
$compile:
- due to d0efd5ee, Child elements that are defined either in the application template or in some other directives template do not get the isolate scope. In theory, nobody should rely on this behavior, as it is very rare - in most cases the isolate directive has a template.
- due to 909cabd3, Directives without isolate scope do not get the isolate scope from an isolate directive on the same element. If your code depends on this behavior (non-isolate directive needs to access state from within the isolate scope), change the isolate directive to use scope locals to pass these explicitly.
Before
<input ng-model="$parent.value" ng-isolate> .directive('ngIsolate', function() { return { scope: {}, template: '{{value}}' }; });
After
<input ng-model="value" ng-isolate> .directive('ngIsolate', function() { return { scope: {value: '=ngModel'}, template: '{{value}} }; });
- due to 79223eae,
Previously, the interpolation priority was
-100
in 1.2.0-rc.2, and100
before 1.2.0-rc.2. Before this change the binding was setup in the post-linking phase.Now the attribute interpolation (binding) executes as a directive with priority 100 and the binding is set up in the pre-linking phase.
Closes #4525, #4528, and #4649
- π $parse: due to 3d6a89e8,
This commit introduces the notion of "private" properties (properties whose names begin and/or end with an underscore) on the scope chain. These properties will not be available to Angular expressions (i.e. {{ }} interpolation in templates and strings passed to
$parse
) They are freely available to JavaScript code (as before).Motivation
Angular expressions execute in a limited context. They do not have direct access to the global scope,
window
,document
or the Function constructor.Β However, they have direct access to names/properties on the scope chain.Β It has been a long standing best practice to keep sensitive APIs outside of the scope chain (in a closure or your controller.)Β That's easier said that done for two reasons:- JavaScript does not have a notion of private properties so if you need someone on the scope chain for JavaScript use, you also expose it to Angular expressions
- the new "controller as" syntax that's now in increased usage exposes the entire controller on the scope chain greatly increasing the exposed surface.
Though Angular expressions are written and controlled by the developer, they:
- Typically deal with user input
- Don't get the kind of test coverage that JavaScript code would
This commit provides a way, via a naming convention, to allow publishing/restricting properties from controllers/scopes to Angular expressions enabling one to only expose those properties that are actually needed by the expressions.
csp: due to 08f376f2, triggering ngCsp directive via
ng:csp
attribute is not supported any more. Please usedata-ng-csp
instead.jqLite: due to 27e9340b,
jqLite.scope()
(commonly used throughangular.element(node).scope()
) does not return the isolate scope on the element that triggered directive with isolate scope. UsejqLite.isolateScope()
instead.
-
v1.2.0-rc.3 Changes
October 14, 2013π Features
- $interval: add a service wrapping setInterval (2b5ce84f)
- $sce: simpler patterns for
$sceDelegateProviders
white/blacklists (93ce5923, #4006) - $filter: allow map of filters to be registered (4033cf28, #4036, #4091)
$compile: support
tel:
links ina[href]
(e7730297)Directives:
Misc:
π Bug Fixes
- $compile:
- abort compilation when duplicate element transclusion (63c5334c, #3893, #4217, #3307)
- make order directives w/ same priority deterministic (4357da85)
- fix (reverse) directive postLink fn execution order (31f190d4, #3558)
- don't terminate compilation for regular transclusion directives (fe214501)
- ng-attr to support dash separated attribute names (8e6e3eba)
- allow interpolations for non-event handlers attrs (8e1276c0)
- link parents before traversing (742271ff, #3792, #3923, #3935, #3927)
- collect ranges on multiple directives on one element (6a8edc1d, #4002)
- π $parse:
- $httpBackend:
- $location:
- π² $log: prevent logging
undefined
for $log in IE (4ff1a650, #1705) Scope:
Filters:
- date: allow negative millisecond value strings (025c9219)
Directives:
- correct priority of structural directives (ngRepeat, ngSwitchWhen, ngIf, ngInclude, ngView) (b7af76b4)
- input:
false
is no longer an empty value by default (b56b21a8, #3490) - ngBindHtml: watch string value instead of wrapper (e2068ad4, #3932)
- ngOptions: ignore object properties which start with $ (aa3c54c7)
- ngRepeat: correctly track elements even when the collection is initially undefined (31c56f54, #4145, #3964)
- ngTransclude: detect ngTransclude usage without a transclusion directive (5a1a6b86, #3759)
jqLite:
Misc:
ngRoute:
ngResource:
ngSanitize:
ngTouch:
ngAnimate:
- ensure that a timeStamp is created if not provided by the browser event (cd216c4c, #3053)
- perform internal caching on getComputedStyle to boost the performance of CSS3 transitions/animations (b1e604e3, #4011, #4124)
- ensure structural animations skip all child animations even if no animation is present during compile (cc584607, #3215)
- cancel any ongoing child animations during move and leave animations (3f31a7c7)
- ensure elapsedTime always considers delay values (079dd939)
- ensure transition-property is not changed when only keyframe animations are in use (2df3c9f5, #3933)
- avoid completing the animation asynchronously unless CSS transitions/animations are present (2a63dfa6, #4023, #3940)
- ensure that delays are always considered before an animation closes (0a63adce, #4028)
- check elapsedTime on current event (d50ed6bf)
- support addClass/removeClass animations on SVG nodes (c785267e, #3858)
ngScenario:
π₯ Breaking Changes
- $compile: due to 31f190d4, the order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute.
Previously the compile/link fns executed in this order controlled via priority:
- CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow
- compile child nodes
- PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow
- link child nodes
- PostLinkPriorityHigh, PostLinkPriorityMedium, PostLinkPriorityLow
This was changed to:
- CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow
- compile child nodes
- PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow
- link child nodes
- PostLinkPriorityLow, PostLinkPriorityMedium , PostLinkPriorityHigh
Very few directives in practice rely on order of postLinking function (unlike on the order of compile functions), so in the rare case of this change affecting an existing directive, it might be necessary to convert it to a preLinking function or give it negative priority (look at the diff of this commit to see how an internal attribute interpolation directive was adjusted).
π $parse:
- due to 5dc35b52,
$parse and templates in general will no longer automatically unwrap promises. This feature has been deprecated and if absolutely needed, it can be reenabled during transitional period via
$parseProvider.unwrapPromises(true)
api. - due to b6a37d11, feature added in rc.2 that unwraps return values from functions if the values are promises (if promise unwrapping is enabled - see previous point), was reverted due to breaking a popular usage pattern.
- due to 5dc35b52,
$parse and templates in general will no longer automatically unwrap promises. This feature has been deprecated and if absolutely needed, it can be reenabled during transitional period via
directives: due to b7af76b4, the priority of ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView has changed. This could affect directives that explicitly specify their priority.
In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView work together in all common scenarios their directives are being adjusted to achieve the following precedence:
Directive | Old Priority | New Priority ============================================= ngRepeat | 1000 | 1000 --------------------------------------------- ngSwitchWhen | 500 | 800 --------------------------------------------- ngIf | 1000 | 600 --------------------------------------------- ngInclude/ngView | 1000 | 400
- form/ngForm due to 7a586e5c, Inputs with name equal to "hasOwnProperty" are not allowed inside form or ngForm directives.
Before, inputs whose name was "hasOwnProperty" were quietly ignored and not added to the scope. Now a badname exception is thrown.
Using "hasOwnProperty" for an input name would be very unusual and bad practice.
Either do not include such an input in a
form
orngForm
directive or change the name of the input.- ngScenario: due to 28f56a38,
browserTrigger now uses an eventData object instead of direct parameters for mouse events.
To migrate, place the
keys
,x
andy
parameters inside of an object and place that as the third parameter for the browserTrigger function.