refactor(core): view engine - move handleEvent function from view to element

Some versions of TypeScript are super slow to compile functions that
contain a lot of `if` conditions in them. Splitting the handle event
expressions per element is similar to what we did in the old codegen.
This commit is contained in:
Tobias Bosch
2017-02-20 12:15:03 -08:00
committed by Igor Minar
parent 58ba4f0409
commit 32012a1ffb
16 changed files with 187 additions and 183 deletions

View File

@ -67,10 +67,10 @@ function TreeComponent_0(): ViewDefinition {
NodeFlags.None, null, null, 1, 'span', null,
[[BindingType.ElementStyle, 'backgroundColor', null]]),
textDef(null, [' ', ' ']),
anchorDef(NodeFlags.HasEmbeddedViews, null, null, 1, TreeComponent_1),
anchorDef(NodeFlags.HasEmbeddedViews, null, null, 1, null, TreeComponent_1),
directiveDef(
NodeFlags.None, null, 0, NgIf, [ViewContainerRef, TemplateRef], {ngIf: [0, 'ngIf']}),
anchorDef(NodeFlags.HasEmbeddedViews, null, null, 1, TreeComponent_2),
anchorDef(NodeFlags.HasEmbeddedViews, null, null, 1, null, TreeComponent_2),
directiveDef(
NodeFlags.None, null, 0, NgIf, [ViewContainerRef, TemplateRef], {ngIf: [0, 'ngIf']}),
],