refactor(ivy): remove type
from DirectiveDef
(#21374)
This change makes the code cleaner for the user. It does mean a little bit more work for us since we have to patch the `type` back into the `DirectiveDef`. However since the patching happens only once on startup it should not be significant. PR Close #21374
This commit is contained in:
@ -16,16 +16,13 @@ export class LargeTableComponent {
|
||||
|
||||
/** @nocollapse */
|
||||
static ngComponentDef: ComponentDef<LargeTableComponent> = defineComponent({
|
||||
type: LargeTableComponent,
|
||||
tag: 'largetable',
|
||||
template: function(ctx: LargeTableComponent, cm: boolean) {
|
||||
if (cm) {
|
||||
E(0, 'table');
|
||||
{
|
||||
E(1, 'tbody');
|
||||
{
|
||||
C(2);
|
||||
}
|
||||
{ C(2); }
|
||||
e();
|
||||
}
|
||||
e();
|
||||
|
@ -36,7 +36,6 @@ export class TreeComponent {
|
||||
|
||||
/** @nocollapse */
|
||||
static ngComponentDef: ComponentDef<TreeComponent> = defineComponent({
|
||||
type: TreeComponent,
|
||||
tag: 'tree',
|
||||
template: function(ctx: TreeComponent, cm: boolean) {
|
||||
if (cm) {
|
||||
@ -93,7 +92,6 @@ export class TreeFunction extends TreeComponent {
|
||||
|
||||
/** @nocollapse */
|
||||
static ngComponentDef: ComponentDef<TreeFunction> = defineComponent({
|
||||
type: TreeFunction,
|
||||
tag: 'tree',
|
||||
template: function(ctx: TreeFunction, cm: boolean) {
|
||||
// bit of a hack
|
||||
|
Reference in New Issue
Block a user