289 KiB
1.3.0-beta.10 excessive-clarification (2014-05-23)
Bug Fixes
- $animate: retain inline styles for property-specific transitions (98b9d68e, #7503)
- $compile: do not merge attrs that are the same for replace directives (1ab6e908, #7463)
- $parse: remove deprecated promise unwrapping (fa6e411d)
- Scope: $broadcast and $emit should set event.currentScope to null (82f45aee, #7445, #7523)
- ngModel: do not dirty the input on $commitViewValue if nothing was changed (facd904a, #7457, #7495)
Features
- $interpolate: escaped interpolation expressions (e3f78c17, #5601, #7517)
- {{ bindings }}: lazy one-time binding support (cee429f0, #7486, #5408)
- ngMock: add support of mocha tdd interface (854bf5b7, #7489)
Performance Improvements
Breaking Changes
-
$compile: due to eec6394a, The
replaceflag for defining directives that replace the element that they are on will be removed in the next major angular version. This feature has difficult semantics (e.g. how attributes are merged) and leads to more problems compared to what it solves. Also, with Web Components it is normal to have custom elements in the DOM. -
$parse: due to fa6e411d, promise unwrapping has been removed. It has been deprecated since 1.2.0-rc.3. It can no longer be turned on. Two methods have been removed:
$parseProvider.unwrapPromises$parseProvider.logPromiseWarnings
-
Scope: due to 82f45aee, #7445, #7523
$broadcastand$emitwill now reset thecurrentScopeproperty of the event to null once the event finished propagating. If any code depends on asynchronously accessing theircurrentScopeproperty, it should be migrated to usetargetScopeinstead. All of these cases should be considered programming bugs.
1.3.0-beta.9 release-naming (2014-05-16)
Bug Fixes
- $compile: pass
transcludeFndown to nested transclude directives (4f03dc5a, #7240, #7387) - jqLite: use jQuery only if jQuery.fn.on present (e9bc51cb)
- ngClass: handle index changes when an item is unshifted (5fbd618c, #7256)
- ngMessages: annotate ngMessages controller for minification (0282ca97)
- numberFilter: fix rounding error edge case (81d427b5, #7453, #7478)
Features
- ngTouch: add optional
ngSwipeDisableMouseattribute tongSwipedirectives to ignore mouse events. (5a568b4f, #6627, #6626)
Breaking Changes
- jqLite: due to d71dbb1a,
the jQuery
detach()method does not trigger the$destroyevent. If you want to destroy Angular data attached to the element, useremove().
1.3.0-beta.8 accidental-haiku (2014-05-09)
Bug Fixes
- $compile: set $isolateScope correctly for sync template directives (562c4e42, #6942)
- $httpBackend: Add missing expectHEAD() method (e1d61784, #7320)
- $interpolate: don't ReferenceError when context is undefined (924ee6db, #7230, #7237)
- grunt-utils: ensure special inline CSS works when
angularis not a global (af72f40a, #7176) - injector: invoke config blocks for module after all providers (c0b4e2db, #7139, #7147)
- ngModelOptions:
- ngSanitize: encode surrogate pair properly (627b0354, #5088, #6911)
- ngSrc, ngSrcset: only interpolate if all expressions are defined (8d180383, #6984)
- ngSwitch: properly support case labels with different numbers of transclude fns (ac37915e, #7372, #7373)
Features
- $compile: allow SVG and MathML templates via special
typeproperty (f0e12ea7, #7265) - $interpolate: add optional allOrNothing param (c2362e3f)
- FormController: commit
$viewValueof all child controls when form is submitted (a0ae07bd, #7017) - NgMessages: introduce the NgMessages module and directives (0f4016c8)
Breaking Changes
- $http: due to ad4336f9,
Previously, it was possible to register a response interceptor like so:
// register the interceptor as a service
$provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
return function(promise) {
return promise.then(function(response) {
// do something on success
return response;
}, function(response) {
// do something on error
if (canRecover(response)) {
return responseOrNewPromise
}
return $q.reject(response);
});
}
});
$httpProvider.responseInterceptors.push('myHttpInterceptor');
Now, one must use the newer API introduced in v1.1.4 (4ae46814), like so:
$provide.factory('myHttpInterceptor', function($q) {
return {
response: function(response) {
// do something on success
return response;
},
responseError: function(response) {
// do something on error
if (canRecover(response)) {
return responseOrNewPromise
}
return $q.reject(response);
}
};
});
$httpProvider.interceptors.push('myHttpInterceptor');
More details on the new interceptors API (which has been around as of v1.1.4) can be found at https://docs.angularjs.org/api/ng/service/$http#interceptors
- injector: due to c0b4e2db,
Previously, config blocks would be able to control behaviour of provider registration, due to being invoked prior to provider registration. Now, provider registration always occurs prior to configuration for a given module, and therefore config blocks are not able to have any control over a providers registration.
Example:
Previously, the following:
angular.module('foo', [])
.provider('$rootProvider', function() {
this.$get = function() { ... }
})
.config(function($rootProvider) {
$rootProvider.dependentMode = "B";
})
.provider('$dependentProvider', function($rootProvider) {
if ($rootProvider.dependentMode === "A") {
this.$get = function() {
// Special mode!
}
} else {
this.$get = function() {
// something else
}
}
});
would have "worked", meaning behaviour of the config block between the registration of "$rootProvider" and "$dependentProvider" would have actually accomplished something and changed the behaviour of the app. This is no longer possible within a single module.
- ngModelOptions: due to adfc322b,
This commit changes the API on NgModelController, both semantically and
in terms of adding and renaming methods.
$setViewValue(value)- This method still changes the$viewValuebut does not immediately commit this change through to the$modelValueas it did previously. Now the value is committed only when a trigger specified in an associatedngModelOptionsdirective occurs. IfngModelOptionsalso has adebouncedelay specified for the trigger then the change will also be debounced before being committed. In most cases this should not have a significant impact on howNgModelControlleris used: IfupdateOnincludesdefaultthen$setViewValuewill trigger a (potentially debounced) commit immediately.$cancelUpdate()- is renamed to$rollbackViewValue()and has the same meaning, which is to revert the current$viewValueback to the$lastCommittedViewValue, to cancel any pending debounced updates and to re-render the input.
To migrate code that used $cancelUpdate() follow the example below:
Before:
$scope.resetWithCancel = function (e) {
if (e.keyCode == 27) {
$scope.myForm.myInput1.$cancelUpdate();
$scope.myValue = '';
}
};
After:
$scope.resetWithCancel = function (e) {
if (e.keyCode == 27) {
$scope.myForm.myInput1.$rollbackViewValue();
$scope.myValue = '';
}
}
v1.3.0-beta.7 proper-attribution (2014-04-25)
Bug Fixes
Performance Improvements
- scope: ~10x speedup from sharing the child scope class. (8377e818)
v1.3.0-beta.6 expedient-caffeination (2014-04-21)
Bug Fixes
- $animate: ensure class-based animations always perform a domOperation if skipped (708f2ba9, #6957)
- $compile:
- $location:
- input: don't dirty model when input event triggered due to placeholder change (ff428e72, #2614, #5960)
- limitTo: do not convert Infinity to NaN (5dee9e4a, #6771, #7118)
- ngModelController: introduce $cancelUpdate to cancel pending updates (940fcb40, #6994, #7014)
Features
- $resource: Make stripping of trailing slashes configurable. (3878be52)
- Scope: add
$watchGroupmethod for observing a set of expressions (21f93163) - injector: "strict-DI" mode which disables "automatic" function annotation (4b1695ec, #6719, #6717, #4504, #6069, #3611)
- ngModelOptions: custom triggers and debounce of ngModel updates (dbe381f2, #1285)
Performance Improvements
- $compile: watch interpolated expressions individually (0ebfa0d1)
- $interpolate: speed up interpolation by recreating watchGroup approach (546cb429)
Breaking Changes
-
$interpolate: due to 88c2193c, the function returned by
$interpolateno longer has a.partsarray set on it.Instead it has two arrays:
.expressions, an array of the expressions in the interpolated text. The expressions are parsed with$parse, with an extra layer converting them to strings when computed.separators, an array of strings representing the separations between interpolations in the text. This array is always 1 item longer than the.expressionsarray for easy merging with it
1.3.0-beta.5 chimeric-glitterfication (2014-04-03)
Bug Fixes
- $animate:
- $parse: mark constant unary minus expressions as constant (7914d346, #6932)
- Scope:
- ngClass: handle ngClassOdd/Even affecting the same classes (c9677920, #5271)
Breaking Changes
- $animate: due to 1cb8584e,
$animatewill no longer default the after parameter to the last element of the parent container. Instead, when after is not specified, the new element will be inserted as the first child of the parent container.
To update existing code, change all instances of $animate.enter() or $animate.move() from:
$animate.enter(element, parent);
to:
$animate.enter(element, parent, angular.element(parent[0].lastChild));
1.2.16 badger-enumeration (2014-04-03)
Bug Fixes
- $animate:
- $parse: mark constant unary minus expressions as constant (6e420ff2, #6932)
- Scope:
- filter.ngdoc: Check if "input" variable is defined (a275d539, #6819)
- input: don't perform HTML5 validation on updated model-value (b2363e31, #6796, #6806)
- ngClass: handle ngClassOdd/Even affecting the same classes (55fe6d63, #5271)
Features
1.3.0-beta.4 inconspicuous-deception (2014-03-28)
Bug Fixes
- $animate:
- Scope: aggressively clean up scope on $destroy to minimize leaks (f552f251, #6794, #6856)
- doc-gen: Run Gulp on Windows too (47ba6014, #6346)
- filter.ngdoc: Check if "input" variable is defined (4a6d4de5, #6819)
- input: don't perform HTML5 validation on updated model-value (b472d027, #6796, #6806)
Features
Breaking Changes
-
$animate: due to 1bebe36a,
Any class-based animation code that makes use of transitions and uses the setup CSS classes (such as class-add and class-remove) must now provide a empty transition value to ensure that its styling is applied right away. In other words if your animation code is expecting any styling to be applied that is defined in the setup class then it will not be applied "instantly" unless a
transition:0s nonevalue is present in the styling for that CSS class. This situation is only the case if a transition is already present on the base CSS class once the animation kicks off.
Before:
.animated.my-class-add {
opacity:0;
transition:0.5s linear all;
}
.animated.my-class-add.my-class-add-active {
opacity:1;
}
After:
.animated.my-class-add {
transition:0s linear all;
opacity:0;
}
.animated.my-class-add.my-class-add-active {
transition:0.5s linear all;
opacity:1;
}
Please view the documentation for ngAnimate for more info.
1.3.0-beta.3 emotional-waffles (2014-03-21)
Bug Fixes
- ngAnimate: support
webkitCancelRequestAnimationFramein addition towebkitCancelAnimationFrame(c839f78b, #6526) - $http: allow sending Blob data using
$http(b8cc71d4, #5012) - $httpBackend: don't error when JSONP callback is called with no parameter (6680b7b9, #4987, #6735)
- $rootScope: ng-repeat can't handle
NaNvalues. #4605 (fb6062fb, #4605) - $rootScope:
$watchCollectionshould call listener with old value (78057a94, #2621, #5661, #5688, #6736) - angular.bootstrap: allow angular to load only once (748a6c8d, #5863, #5587)
- jqLite:
inheritedData()now traverses Shadow DOM boundaries via thehostproperty ofDocumentFragment(8a96f317, #6637) - ngCookie: convert non-string values to string (36528310, #6151, #6220)
- ngTouch: update workaround for Webkit quirk (bc42950b, #6302)
- orderBy: support string predicates containing non-ident characters (37bc5ef4, #6143, #6144)
- select: avoid checking option element's
selectedproperty in render (f40f54c6, #2448, #5994)
Features
- $compile: add support for
$observerderegistration (299b220f, #5609) - ngMock.$httpBackend: added support for function as URL matcher (d6cfcace, #4580)
Breaking Changes
- $compile: due to 299b220f,
calling
attr.$observeno longer returns the observer function, but a deregistration function instead. To migrate the code follow the example below:
Before:
directive('directiveName', function() {
return {
link: function(scope, elm, attr) {
var observer = attr.$observe('someAttr', function(value) {
console.log(value);
});
}
};
});
After:
directive('directiveName', function() {
return {
link: function(scope, elm, attr) {
var observer = function(value) {
console.log(value);
};
attr.$observe('someAttr', observer);
}
};
});
- $httpBackend: due to 6680b7b9, the JSONP behavior for erroneous and empty responses changed: Previously, a JSONP response was regarded as erroneous if it was empty. Now Angular is listening to the correct events to detect errors, i.e. even empty responses can be successful.
v1.2.15 beer-underestimating (2014-03-21)
Bug Fixes
- $$RAFProvider: check for webkitCancelRequestAnimationFrame (e84da228, #6526)
- $$rAF: always fallback to a $timeout incase native rAF isn't supported (ee8e4a94, #6654)
- $compile: support templates with thead and tfoot root elements (ca0ac649, #6289)
- $http:
- $rootScope:
- angular.bootstrap: only allow angular to load once (0d60f8d3, #5863, #5587)
- jqLite: traverse
hostproperty for DocumentFragment in inheritedData() (98d825e1, #6637) - ngAnimate: setting classNameFilter disables animation inside ng-if (a41a2a1d, #6539)
- ngCookie: convert non-string values to string (93d1c95c, #6151, #6220)
- ngTouch: update workaround for desktop Webkit quirk (01a34f51, #6302)
- orderBy: support string predicates containing non-ident characters (10d3e1e4, #6143, #6144)
- select: avoid checking option element selected properties in render (dc149de9, #2448, #5994, #6769)
1.3.0-beta.2 silent-ventriloquism (2014-03-14)
Bug Fixes
- $$rAF: always fallback to a $timeout in case native rAF isn't supported (7b5e0199, #6654)
- $http: don't convert 0 status codes to 404 for non-file protocols (56e73ea3, #6074, #6155)
- ngAnimate: setting classNameFilter disables animation inside ng-if (129e2e02, #6539)
Features
1.3.0-beta.1 retractable-eyebrow (2014-03-07)
Bug Fixes
- $compile: support templates with thead and tfoot root elements (53ec5e13, #6289)
- style: expressions in style tags (0609453e, #2387, #6492)
Features
Breaking Changes
- build: due to eaa1d00b, As communicated before, IE8 is no longer supported.
- input: types date, time, datetime-local, month, week now always
require a
Dateobject as model (46bd6dc8, #5864)
For more info: http://blog.angularjs.org/2013/12/angularjs-13-new-release-approaches.html
1.2.14 feisty-cryokinesis (2014-03-01)
Bug Fixes
- $animate:
- delegate down to addClass/removeClass if setClass is not found (18c41af0, #6463)
- ensure all comment nodes are removed during a leave animation (f4f1f43d, #6403)
- only block keyframes if a stagger is set to occur (e71e7b6c, #4225)
- ensure that animateable directives cancel expired leave animations (e9881991, #5886)
- ensure all animated elements are taken care of during the closing timeout (99720fb5, #6395)
- fix for TypeError Cannot call method 'querySelectorAll' in cancelChildAnimations (c914cd99, #6205)
- $http:
- $parse: reduce false-positives in isElement tests (5fe1f39f, #4805, #5675)
- input: use ValidityState to determine validity (c2d447e3, #4293, #2144, #4857, #5120, #4945, #5500, #5944)
- isElement: reduce false-positives in isElement tests (75515852)
- jqLite: