feat(router): add the ANALYZE_FOR_PRECOMPILE provider to make dev ergonomics better

This commit is contained in:
vsavkin
2016-07-07 17:53:26 -07:00
parent 46e105f3ab
commit 96a9e66616
5 changed files with 24 additions and 25 deletions

View File

@ -74,15 +74,12 @@ export class RouterOutlet {
}
} catch (e) {
if (!(e instanceof NoComponentFactoryError)) throw e;
// TODO: vsavkin uncomment this once ComponentResolver is deprecated
// const componentName = component ? component.name : null;
// console.warn(
// `'${componentName}' not found in precompile array. To ensure all components referred
// to by the Routes 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.`);
const componentName = component ? component.name : null;
console.warn(
`'${componentName}' not found in precompile array. To ensure all components referred
to by the Routes 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;
}