refactor(compiler): introduce directive wrappers to generate less code

- for now only wraps the `@Input` properties and calls
  to `ngOnInit`, `ngDoCheck` and `ngOnChanges` of directives.
- also groups eval sources by NgModule.

Part of #11683
This commit is contained in:
Tobias Bosch
2016-10-13 16:34:37 -07:00
committed by Alex Rickabaugh
parent c951822c35
commit b0a03fcab3
23 changed files with 606 additions and 278 deletions

View File

@ -116,8 +116,7 @@ export class CompileMetadataResolver {
return null;
}
getDirectiveMetadata(directiveType: Type<any>, throwIfNotFound = true):
cpl.CompileDirectiveMetadata {
getDirectiveMetadata(directiveType: any, throwIfNotFound = true): cpl.CompileDirectiveMetadata {
directiveType = resolveForwardRef(directiveType);
let meta = this._directiveCache.get(directiveType);
if (!meta) {