Documentation around standalone component routing is lacking

This issue has been created since 2022-11-23.

Which @angular/* package(s) are relevant/related to the feature request?

router

Description

When purely bootstrapping Angular with standalone components, it is hard to understand how more complex examples can utilize routing. The existing documentation is good to explain simple cases and getting started, but lacks in specific areas I have noticed. Feel free to suggest other areas which I have not thought of:

How do we test standalone components that depend on routing? Do we use RoutingTestingModule, or somehow incorporate provideRouter which I had no idea about? How do we mock out routing so that we can assert we are actually navigating properly or that we are able to read parameters/url matching properly?

I managed to figure this out from a stack overflow post, but it should be also more apparent how you set up routing with a pure standalone component based application. The example you guys have is based around having an initial angular module which is not present if you use the boostrapApplication function.

Proposed solution

Add a detailed section for examples and utilities that can be used to test routing with standalone components and have an example of a pure standalone component that uses the bootstrapApplication method

Alternatives considered

Stackoverflow... Literally nothing on this topic has been answered from what I have seen, and I can't find a good resource that explains how to do this to the extent that it would be useful

Also looked at the small bit of routing (which is only for lazy loading) that you showed but doesn't explain how testing routing changes with these new component types

atscott wrote this answer on 2022-11-24

Yes, this is absolutely true. Standalone features only just exited developer preview in the v15 release. We still have an item on our backlog to update documentation. But rest assured, this will be done. We aren't considering the standalone project "complete" until things like documentation are in place.

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-12-01
Star Count 85220
Watcher Count 3042
Fork Count 22607
Issue Count 1316

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
import cellprofiler_core.pipeline 1 2022-05-13 2022-09-28
bug: HTTP 500 Internal: could not convert json to flow Error("missing field `value`", line: 0, column: 0) 0 2022-10-25 2022-11-14
todo: Remove local binding + setTimeout 0 2022-10-26 2022-11-20
Evaluation of attributes 1 2022-05-04 2022-08-05
Profile memory for TSDataset 1 2022-05-11 2022-10-02
Request to rework the pool's checksum module 5 2022-03-23 2022-08-14
Keyboard gets under the bottom bar 0 2022-07-08 2022-07-13
Swap page: bad performance 0 2022-07-08 2022-07-13
Mailgun Webhook receiver erroring beginning March 26, 2021 3 2021-03-26 2022-10-09
About `Wilder Float` 2 2022-05-14 2022-11-02
Issues with doom-nord and Doom Modeline (cyan color and hover) 1 2021-06-28 2022-11-08
Add Getrange command 1 2022-06-04 2022-11-27
[Wine-tkg] Nonsensical Witcher 3 Performance 13 2022-07-28 2022-11-22
Строчно-блочная модель и японское письмо 1 2022-08-17 2022-10-31
About Direct3D11CaptureFramePool:Does it capture only one process at a time? 1 2021-08-01 2022-10-28
Static members cannot reference class type parameters. 1 2021-10-19 2022-10-26
Amplitude Envelope cannot have values edited in run time 4 2021-04-15 2022-10-23
Relay: typing notifications 2 2021-07-10 2022-03-28
Device does not enter DFU mode 11 2016-12-01 2022-11-28
`AbstractPlotting.vbox` alternatives 4 2022-01-11 2022-10-31
关于小目标检测和input_shape的问题? 4 2022-10-12 2022-10-10
Transaction fees not accurate anymore 0 2021-10-20 2022-08-25
Questions about cache operations for shared buffer 6 2022-03-09 2022-11-30
Does IgnoreClasses ignore just a DOM element, or a DOM element and all of its children? 1 2022-08-22 2022-11-23
problem with seek() for streamed MP3 file 2 2022-08-25 2022-11-20
No top padding on a Google Pixel 4a 0 2022-09-07 2022-11-25
TransactionalKafkaProducer don't commit offset with empty records 1 2022-11-09 2022-11-13
withCreateConsumer and withCreateProducter methods have been removed 1 2022-10-21 2022-11-13
Feature request: expose_stan_functions for pystan? 25 2017-06-26 2022-11-22
Web Portal for Remote Assistance no longer works with latest version of Quick Assist 2.0.6.0 0 2022-06-08 2022-11-13
[Question] Start a Workflow 4 2022-01-19 2022-11-13
[Tmail-web] Calendar mail invites are not appearing in message list 3 2022-03-23 2022-10-30
"Password authentication failed for user postgres" when using custom pg_hba.conf 6 2022-01-13 2022-11-28
Support for redshift secretsmanager driver 1 2021-08-30 2022-11-17
Ignores existing tags? 0 2021-08-30 2022-11-01
Cannot connect to cyclotron-svc (getTopDashboards) 8 2020-03-23 2022-11-12
Update `Microsoft.Data.SqlClient` to enable Azure Federated Identity (depends on v5.0.0 GA) 4 2022-07-03 2022-11-10
How to mock lib functions 2 2022-04-28 2022-10-19
Darkly form input field text is too dark 3 2021-09-03 2022-11-13
Vapor no-repeat 1 2021-09-07 2022-01-14
Scaling on consumption plan: inconsistent documentation 7 2022-03-25 2022-11-22
assign static IP addresses to ingress controllers 0 2022-10-14 2022-11-18
Pandoc 2.13 adds YAML block support for commonmark ( and gfm) 2 2021-04-28 2022-11-01
Point in time - discover section changes 0 2022-07-28 2022-10-18
Developer / API docs are not all generating 0 2022-03-19 2022-03-20
Combobox scrollToItem is not always working 3 2022-03-28 2022-10-11
Jupyter Community Call - December 2020 2 2020-12-09 2022-09-14
Client Allocation Request for: Hedra Labs 4 2022-05-26 2022-11-15
Azure Firewall Policy: Error when using tags with Uppercase letters 2 2022-10-12 2022-10-17
[WEB] - Navigator 2.0 - URL #fragment is removed when page is reloaded 3 2022-05-14 2022-10-26