From fb2539e1d5c2fc3ca4ef8ce6a00af5f90bd36bfb Mon Sep 17 00:00:00 2001 From: vsavkin Date: Thu, 30 Jun 2016 14:07:15 -0700 Subject: [PATCH] fix(router): remove the precompile warning --- .../@angular/router/src/directives/router_outlet.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/@angular/router/src/directives/router_outlet.ts b/modules/@angular/router/src/directives/router_outlet.ts index 1998f1ac53..b2ab00b6ed 100644 --- a/modules/@angular/router/src/directives/router_outlet.ts +++ b/modules/@angular/router/src/directives/router_outlet.ts @@ -73,10 +73,14 @@ export class RouterOutlet { this.componentFactoryResolver.resolveComponentFactory(component); } catch (e) { if (!(e instanceof NoComponentFactoryError)) throw e; - const componentName = component ? component.name : null; - console.warn( - `'${componentName}' not found in precompile array. To ensure all components referred to by the RouterConfig are compiled, you must add '${componentName}' to the 'precompile' array of your application component. This will be required in a future release of the router.`); + // TODO: vsavkin uncomment this once CompoentResolver is deprecated + // const componentName = component ? component.name : null; + // console.warn( + // `'${componentName}' not found in precompile array. To ensure all components referred + // to by the RouterConfig are compiled, you must add '${componentName}' to the + // 'precompile' array of your application component. This will be required in a future + // release of the router.`); factory = snapshot._resolvedComponentFactory; }