refactor(ivy): remove directive references from template (#22986)

PR Close #22986
This commit is contained in:
Kara Erickson
2018-03-25 21:32:39 -07:00
committed by Matias Niemelä
parent 2aabbc51fa
commit 910a16a1ff
48 changed files with 1734 additions and 1278 deletions

View File

@ -17,7 +17,7 @@ export class LargeTableComponent {
/** @nocollapse */
static ngComponentDef: ComponentDef<LargeTableComponent> = defineComponent({
type: LargeTableComponent,
tag: 'largetable',
selector: [[['largetable'], null]],
template: function(ctx: LargeTableComponent, cm: boolean) {
if (cm) {
E(0, 'table');

View File

@ -37,7 +37,7 @@ export class TreeComponent {
/** @nocollapse */
static ngComponentDef: ComponentDef<TreeComponent> = defineComponent({
type: TreeComponent,
tag: 'tree',
selector: [[['tree'], null]],
template: function(ctx: TreeComponent, cm: boolean) {
if (cm) {
E(0, 'span');
@ -54,7 +54,7 @@ export class TreeComponent {
let cm0 = V(0);
{
if (cm0) {
E(0, TreeComponent);
E(0, 'tree');
e();
}
p(0, 'data', b(ctx.data.left));
@ -69,7 +69,7 @@ export class TreeComponent {
let cm0 = V(0);
{
if (cm0) {
E(0, TreeComponent);
E(0, 'tree');
e();
}
p(0, 'data', b(ctx.data.right));
@ -80,7 +80,8 @@ export class TreeComponent {
cr();
},
factory: () => new TreeComponent,
inputs: {data: 'data'}
inputs: {data: 'data'},
directiveDefs: () => [TreeComponent.ngComponentDef]
});
}
@ -90,7 +91,7 @@ export class TreeFunction {
/** @nocollapse */
static ngComponentDef: ComponentDef<TreeFunction> = defineComponent({
type: TreeFunction,
tag: 'tree',
selector: [[['tree'], null]],
template: function(ctx: TreeFunction, cm: boolean) {
// bit of a hack
TreeTpl(ctx.data, cm);