@@ -79,11 +79,13 @@ export class HostGeneratorService {
79
79
genForComponent < T > ( compType : Type < T > ) : Type < AsHostComponent < T > > {
80
80
const factory = this . cfr . resolveComponentFactory ( compType ) ;
81
81
const selector = `host-${ factory . selector } ` ;
82
- const template = genHostCompTpl (
83
- factory . selector ,
84
- factory ,
85
- this . extraConfig . projectContent ,
86
- ) ;
82
+ const template =
83
+ this . extraConfig . template ||
84
+ genHostCompTpl (
85
+ factory . selector ,
86
+ factory ,
87
+ this . extraConfig . projectContent ,
88
+ ) ;
87
89
88
90
return this . genComponent ( { selector, template } , compType , factory ) ;
89
91
}
@@ -92,14 +94,18 @@ export class HostGeneratorService {
92
94
const io = getDirectiveIO ( dirType ) ;
93
95
94
96
const selector = `host-directive` ;
95
- const templateTag = this . extraConfig . hostComponent
97
+
98
+ const templateTag = this . extraConfig . template
99
+ ? ''
100
+ : this . extraConfig . hostComponent
96
101
? this . cfr . resolveComponentFactory ( this . extraConfig . hostComponent )
97
102
. selector
98
103
: this . extraConfig . hostTag ;
99
104
100
- const template = templateTag
101
- ? this . genDirectiveTemplate ( templateTag , io )
102
- : '' ;
105
+ const template =
106
+ this . extraConfig . template || templateTag
107
+ ? this . genDirectiveTemplate ( templateTag , io )
108
+ : '' ;
103
109
104
110
return this . genComponent ( { selector, template } , dirType , io ) ;
105
111
}
0 commit comments