Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(CHANGELOG.md): add missing breaking changes from #16476 #16556

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
[#15597](https://github.com/angular/angular.js/issues/15597))
- **$interval:** throw when trying to cancel non-$interval promise
([a8bef9](https://github.com/angular/angular.js/commit/a8bef95127775d83d80daa4617c33227c4b443d4),
[#16424](https://github.com/angular/angular.js/issues/16424),
[#16476](https://github.com/angular/angular.js/issues/16476))
- **$timeout:** throw when trying to cancel non-$timeout promise
([336525](https://github.com/angular/angular.js/commit/3365256502344970f86355d3ace1cb4251ae9828),
[#16424](https://github.com/angular/angular.js/issues/16424))
[#16424](https://github.com/angular/angular.js/issues/16424),
[#16476](https://github.com/angular/angular.js/issues/16476))
- **$cookies:** remove the deprecated $cookieStore factory
([73c646](https://github.com/angular/angular.js/commit/73c6467f1468353215dc689c019ed83aa4993c77),
[#16465](https://github.com/angular/angular.js/issues/16465))
Expand Down Expand Up @@ -727,7 +729,7 @@ angular.module('myModule', []).config(function($controllerProvider) {
```

### **$rootScope** due to:
- **([c2b8fa](https://github.com/angular/angular.js/commit/c2b8fab0a480204374d561d6b9b3d47347ac5570))**: provide correct value of one-time bindings in watchGroup
- **[c2b8fa](https://github.com/angular/angular.js/commit/c2b8fab0a480204374d561d6b9b3d47347ac5570)**: provide correct value of one-time bindings in watchGroup

Previously when using `$watchGroup` the entries in `newValues` and
`oldValues` represented the *most recent change of each entry*.
Expand Down Expand Up @@ -777,6 +779,59 @@ Where now the `oldValue` will always equal the previous `newValue`:
| `b=2` | [1, 2] | [1, undefined] |
| `a=b=3` | [3, 2] | [1, 2] |

### **$interval** due to:
- **[a8bef9](https://github.com/angular/angular.js/commit/a8bef95127775d83d80daa4617c33227c4b443d4)**: throw when trying to cancel non-$interval promise

`$interval.cancel()` will throw an error if called with a promise that
was not generated by `$interval()`. Previously, it would silently do
nothing.

Before:
```js
var promise = $interval(doSomething, 1000, 5).then(doSomethingElse);
$interval.cancel(promise); // No error; interval NOT canceled.
```

After:
```js
var promise = $interval(doSomething, 1000, 5).then(doSomethingElse);
$interval.cancel(promise); // Throws error.
```

Correct usage:
```js
var promise = $interval(doSomething, 1000, 5);
var newPromise = promise.then(doSomethingElse);
$interval.cancel(promise); // Interval canceled.
```

### **$timeout** due to:
- **[336525](https://github.com/angular/angular.js/commit/3365256502344970f86355d3ace1cb4251ae9828)**: throw when trying to cancel non-$timeout promise

`$timeout.cancel()` will throw an error if called with a promise that
was not generated by `$timeout()`. Previously, it would silently do
nothing.

Before:
```js
var promise = $timeout(doSomething, 1000).then(doSomethingElse);
$timeout.cancel(promise); // No error; timeout NOT canceled.
```

After:
```js
var promise = $timeout(doSomething, 1000).then(doSomethingElse);
$timeout.cancel(promise); // Throws error.
```

Correct usage:
```js
var promise = $timeout(doSomething, 1000);
var newPromise = promise.then(doSomethingElse);
$timeout.cancel(promise); // Timeout canceled.
```


<a name="1.6.10"></a>
# 1.6.10 crystalline-persuasion (2018-04-17)

Expand Down