https://github.com/angular/angular/issues/16261#issuecomment-748289240
A couple important things to note about the behavior:
* The component is destroyed, meaning that all of its members will be destroyed as well, including any subscriptions to the route params
* This _does not_ mean that any `finalize` operators or `complete` on the subscription is called. This only happens if the source completes or you unsubscribe from the subscription. The documentation doesn't state that the `Router` will do this, though I can still understand why the behavior is confusing.
You can play around with these scenarios here:
https://stackblitz.com/edit/rxjs-hmpizx
* `complete` the source without unsubscribe: `next`, `complete` and `finalize` are all called, even when `complete` is called before the `next` from the `delay`
* `unsubscribe` from subscription without `complete` on the source: `finalize` happens, but the `complete` of the subscription does not, and neither does `next`
So even if the `Router` were to call `complete` on all of the `Observables` on an `ActivatedRoute`, you would see that any subscriptions with a `delay` operator would still get called.
resolves#16261
PR Close#42316
In the deployment guide on AIO, change the Zeit company name to Vercel.
This is because Zeit rebranded to Vercel. Also update link to point to
Vercel's page about angular.
Fixes#38141
PR Close#42285
Correctly the reference to ng-for as `NgForOf` so that we get the word linked to the API page.
`NgFor` is not a JavaScript symbol so the docs infra doesn't autolink to the API page unless
we use the correct symbol name - `NgForOf`.
PR Close#42293
The latest SW app version knows that `/devtools` should be redirected to
`/guide/devtools`. However, if a user has an older app version installed
(and until the SW downloads the latest version) they will get a 404 when
navigating to `/devtools`.
The reason is that the SW will see `/devtools` as a regular navigation
URL and serve `index.html` instead. The Angular app will then try to get
the content for `/devtools` by fetching `/generated/docs/devtools.json`
(which does not exist).
This commit fixes the issue by redirecting
`/generated/docs/devtools.json` to
`/geenrated/docs/guide/devtools.json`. When a user visits `/devtools`
for the first time, they will still be able to see the guide content
(while the SW updates in the background). On subsequent visits (once the
SW has downloaded the latest app version), they will be redirected to
`/guide/devtools`).
At a later time, once we are confident that the majority of users will
have updated to a newer app version, we can remove this temporary
redirect.
PR Close#42283
This fixes an issue in part 5 of the Tour of Heroes tutorial on
angular.io. At the end of the `Add RouterOutlet` section, the reader navigates to
`"/heroes"`. The next section, `Add a navigation link`, instructs the user to click ona link on the dashboard page to navigate to the heroes page. This is problematic because the previous section instructed the reader to navigate to the heroes page, not the dashboard. It assumes, the reader is on the dashboard page.
Fixes issue by instructing the reader to navigate back to the dashboard
after navigating to `"/heroes"` in the `Add RouterOutlet` section.
resolves#41212
PR Close#42279
Include a source code styling section in the style guide for docs,
indicating to follow the Angular style guide where possible and
defining hexidecimal style guidance.
Closes#23691
PR Close#42227
Previously it was mentioned that "Clicking a hero on the Heroes page does nothing.", this is not correct however since this link is implemented using `routerLink`.
Closes#41363
PR Close#42262
Moving the helpful alert expressing that built-in directives use public APIs
to be under the heading about built-in directives generally makes the content
in the alert more related to its surroundings than its previous location within
the ng-for section.
Closes#38525
PR Close#42226
This commit updates the animation docs and provides better clarity for open-close component with it also added click event in open-close.component
Closes#39708
PR Close#42046
Since #41625, `/guide/updating-to-version-10` is being redirected to
`https://v11.angular.io/guide/updating-to-version-11`. However,
`v11.angular.io` itself is being redirected to `angular.io`, while v11
is the latest stable version. As a result,
`/guide/updating-to-version-10` ends up being redirected to
`https://angular.io/guide/updating-to-version-11`. Currently, this
causes a CI failure in the `aio_monidoting` job ([example failure][1]).
This will change once v12 is released as the new stable version.
Alternatively, we could update the config and tests to expected
`/guide/updating-to-version-10` to be redirected to
`https://angular.io/guide/updating-to-version-11`, but that would end up
being redirected to `https://angular.io/guide/updating-to-version-12`
once v12 would be released, which is different behavior.
This commit provides a way to test for redirects when the destination
URL is itself redirected to a different URL. This allows us to use the
intended URL (for example, `https://v11.angular.io/...`), which will
continue to work as expected regardless of what is the latest stable
version without causing CI failures.
[1]: https://circleci.com/gh/angular/angular/983738
PR Close#42018
Previously, the `updating-to-version-*` URLs would redirect to the next
version update guide. More specifically:
- `/guide/updating-to-version-10` --> `https://v11.angular.io/guide/updating-to-version-11`
- `/guide/updating-to-version-11` --> `/guide/updating-to-version-12`
This seems confusing and inconsistent. Either all URLs should redirect
to the latest update guide (currently `/guide/updating-to-version-12`)
or each URL should redirect to the corresponding version.
This commit implements the second approach:
- `/guide/updating-to-version-10` --> `https://v10.angular.io/guide/updating-to-version-10`
- `/guide/updating-to-version-11` --> `https://v11.angular.io/guide/updating-to-version-11`
PR Close#42019