fix(router): mount correct component if router outlet was not instantiated and if using a route reuse strategy (#25313) (#25314)

This unsets 'attachRef' on outlet context if no route is to be reused in route activation.

Closes #25313

PR Close #25314
This commit is contained in:
Daniel Wiehl
2018-08-05 15:35:51 +02:00
committed by Igor Minar
parent f2ba55f2fb
commit 8dc2b119fb
5 changed files with 113 additions and 5 deletions

View File

@ -1043,6 +1043,7 @@ class ActivateRoutes {
const config = parentLoadedConfig(future.snapshot);
const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;
context.attachRef = null;
context.route = future;
context.resolver = cmpFactoryResolver;
if (context.outlet) {