docs: update link to learning promises
to the chapter in Dr. Axel Rauschmayer's ES6 book from his old post closes #1005 The old link on the documentation lead to an article on promises that contained outdated information, so this one leads to newer content.
This commit is contained in:
parent
041bcb302d
commit
e17821492e
|
@ -403,7 +403,7 @@ figure
|
|||
Here's an example of a service class that logs to the browser console
|
||||
+makeExample('architecture/ts/app/logger.service.ts', 'class', 'app/logger.service.ts (class only)')(format=".")
|
||||
:marked
|
||||
Here's a `HeroService` that fetches heroes and returns them in a resolved [promise](http://www.2ality.com/2014/10/es6-promises-api.html).
|
||||
Here's a `HeroService` that fetches heroes and returns them in a resolved [promise](http://exploringjs.com/es6/ch_promises.html).
|
||||
The `HeroService` depends on the `LoggerService` and another `BackendService` that handles the server communication grunt work.
|
||||
+makeExample('architecture/ts/app/hero.service.ts', 'class', 'app/hero.service.ts (class only)')(format=".")
|
||||
:marked
|
||||
|
|
|
@ -966,7 +966,7 @@ code-example(format="").
|
|||
:marked
|
||||
The `DialogService` (injected in the `AppComponent` for app-wide use) does the asking.
|
||||
|
||||
It returns a [promise](http://www.2ality.com/2014/10/es6-promises-api.html) that
|
||||
It returns a [promise](http://exploringjs.com/es6/ch_promises.html) that
|
||||
*resolves* when the user eventually decides what to do: either
|
||||
to discard changes and navigate away (`true`) or to preserve the pending changes and stay in the crisis editor (`false`).
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ code-example(format="." language="html").
|
|||
It does that work (somewhere) and eventually it calls our function with the results of the work or an error.
|
||||
.l-sub-section
|
||||
:marked
|
||||
We are simplifying. Learn about ES2015 Promises [here](http://www.2ality.com/2014/10/es6-promises-api.html) and elsewhere on the web.
|
||||
We are simplifying. Learn about ES2015 Promises [here](http://exploringjs.com/es6/ch_promises.html) and elsewhere on the web.
|
||||
:marked
|
||||
Update the `HeroService` with this promise-returning `getHeroes` method:
|
||||
+makeExample('toh-4/ts/app/hero.service.ts', 'get-heroes', 'hero.service.ts (getHeroes)')(format=".")
|
||||
|
|
Loading…
Reference in New Issue