diff --git a/packages/router/src/operators/activate_routes.ts b/packages/router/src/operators/activate_routes.ts index a045bfe4a8..d946feaa7b 100644 --- a/packages/router/src/operators/activate_routes.ts +++ b/packages/router/src/operators/activate_routes.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import {isDevMode} from '@angular/core'; import {MonoTypeOperatorFunction} from 'rxjs'; import {map} from 'rxjs/operators'; @@ -185,6 +186,10 @@ export class ActivateRoutes { // Activate the outlet when it has already been instantiated // Otherwise it will get activated from its `ngOnInit` when instantiated context.outlet.activateWith(future, cmpFactoryResolver); + } else if (isDevMode() && console && console.warn) { + console.warn( + `A router outlet has not been instantiated during routes activation. URL Segment: '${ + future.snapshot._urlSegment}'`); } this.activateChildRoutes(futureNode, null, context.children);