perf(ivy): avoid generating selectors array for directives without a selector (#33431)

Now that we've replaced `ngBaseDef` with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate the `selectors` array if it's going to be empty.

PR Close #33431
This commit is contained in:
crisbeto
2019-10-27 10:59:23 +01:00
committed by Andrew Kushnir
parent d1246a1d10
commit c3e93564d0
7 changed files with 45 additions and 42 deletions

View File

@ -261,7 +261,6 @@ export function renderTemplate<T>(
enterView(hostLView, null);
const def: ComponentDef<any> = ɵɵdefineComponent({
selectors: [],
type: Object,
template: templateFn,
decls: decls,