Repository navigation
Conversation
The example for clearing secondary outlets currently only works because the named outlet appears at the root of the application's route config. If developers follow this example with an outlet that is not at the root level, they will not be able to close the outlet. This commit updates the example to provide a more robust way of clearing the outlet from the activated outlet component as well as providing a warning about how the commands are applied. Lastly, there is a small bit of guidance provided for developers who might want to explore the ability to close an outlet from any location in the app, without needing to be aware of the activated route. An example of this can be found here: https://stackblitz.com/edit/close-outlet-from-anywhere resolves angular#13523
|
|
|
You can preview 8c8466c at https://pr40272-8c8466c.ngbuilds.io/. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kapunahelewong
left a comment
There was a problem hiding this comment.
Thank you so much for this, @atscott 馃槉
Just a few suggestions on copy. Also, what do you think of removing the alert styling from the second and third alerts and just leaving them as two paragraphs that follow the is-critical? (Just because it's three in a row.)
|
@kapunahelewong thanks for the review! I removed the second and third alerts - I think that was a good idea. |
|
Closing, see discussion in #40225 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The example for clearing secondary outlets currently only works because
the named outlet appears at the root of the application's route config.
If developers follow this example with an outlet that is not at the
root level, they will not be able to close the outlet.
This commit updates the example to provide a more robust way
of clearing the outlet from the activated outlet component
as well as providing a warning about how the commands are applied.
Lastly, there is a small bit of guidance provided for developers who
might want to explore the ability to close an outlet from any location
in the app, without needing to be aware of the activated route.
An example of this can be found here:
https://stackblitz.com/edit/close-outlet-from-anywhere
resolves #13523
Question to reviewers:
I wonder if I should omit the last bit about closing the outlet using
navigateByUrlbecause it goes beyond the common use-cases of just closing the outlet from either the parent that opened it or the activated child itself.It's quite an advanced topic and complicated to explain but may still be something that devs want to do.