fix(router): remove the precompile warning

This commit is contained in:
vsavkin 2016-06-30 14:07:15 -07:00
parent ad9f02a73e
commit fb2539e1d5
1 changed files with 7 additions and 3 deletions

View File

@ -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;
}