You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
The code example is a single line using subscribe:
The description talks about the usage of pluck and forEach. They aren't used (probably anymore) in the code. This is misleading.
The expression after route.params chains an Observable operator that plucks the id from the params and then chains a forEach operator to subscribe to id-changing events. The id changes every time the user navigates to a different hero.
The forEach passes the new id value to the component's getHero method (not shown) which fetches a hero and sets the component's hero property. If the id parameter is missing, the pluck operator fails and the catch treats failure as a request to edit a new hero.
Screenshot
Expected behavior
The description should match the code. The description should be replaced or removed.
I'm submitting a ... (check one with "x")
Current behavior
The code example is a single line using
subscribe
:The description talks about the usage of
pluck
andforEach
. They aren't used (probably anymore) in the code. This is misleading.Screenshot
Expected behavior
The description should match the code. The description should be replaced or removed.
Affected Files
https://github.com/angular/angular/blob/master/aio/content/examples/testing/src/app/hero/hero-detail.component.ts
https://raw.githubusercontent.com/angular/angular/master/aio/content/guide/testing.md
The text was updated successfully, but these errors were encountered: