@@ -215,7 +215,7 @@ You can see the complete application running below.
215
215
216
216
217
217
function HeroService($q) {
218
- var heroesPromise = $q.when ([
218
+ var heroesPromise = $q.resolve ([
219
219
{ id: 11, name: 'Mr. Nice' },
220
220
{ id: 12, name: 'Narco' },
221
221
{ id: 13, name: 'Bombasto' },
@@ -308,7 +308,7 @@ You can see the complete application running below.
308
308
309
309
310
310
function CrisisService($q) {
311
- var crisesPromise = $q.when ([
311
+ var crisesPromise = $q.resolve ([
312
312
{id: 1, name: 'Princess Held Captive'},
313
313
{id: 2, name: 'Dragon Burning Cities'},
314
314
{id: 3, name: 'Giant Asteroid Heading For Earth'},
@@ -415,7 +415,7 @@ You can see the complete application running below.
415
415
416
416
function DialogService($q) {
417
417
this.confirm = function(message) {
418
- return $q.when (window.confirm(message || 'Is it OK?'));
418
+ return $q.resolve (window.confirm(message || 'Is it OK?'));
419
419
};
420
420
}
421
421
</file>
@@ -714,7 +714,7 @@ making an actual server request, perhaps over HTTP.
714
714
715
715
```js
716
716
function HeroService($q) {
717
- var heroesPromise = $q.when ([
717
+ var heroesPromise = $q.resolve ([
718
718
{ id: 11, name: 'Mr. Nice' },
719
719
...
720
720
]);
@@ -991,7 +991,7 @@ have made. The result of the prompt is a promise that can be used in a `$routerC
991
991
992
992
function DialogService($q) {
993
993
this.confirm = function(message) {
994
- return $q.when (window.confirm(message || 'Is it OK?'));
994
+ return $q.resolve (window.confirm(message || 'Is it OK?'));
995
995
};
996
996
}
997
997
```
0 commit comments