Router named outlets that are activated once

前端 未结 4 604
孤城傲影
孤城傲影 2021-01-17 18:11

Is it possible to have router named outlets that are activated once and then never destroyed, no matter what route is navigated in primary outlet?

The intention is t

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 18:34

    Router needs information about named outlets, so there are good chances that implementing your own UrlSerializer will help.

    Idea is simple, deserialization process should be aware of routes which have static named outlets and produce UrlTree which contains named outlets i.e. for /login url should produce the same UrlTree as default serializer will produce for url /login(popup:compose). During serialization static named outlet parameters should not be included into resulting url.

提交回复
热议问题