@@ -52,7 +52,6 @@ import {ComponentDef, DirectiveDef, HostDirectiveDefs} from './interfaces/defini
5252import { InputFlags } from './interfaces/input_flags' ;
5353import {
5454 NodeInputBindings ,
55- TAttributes ,
5655 TContainerNode ,
5756 TElementContainerNode ,
5857 TElementNode ,
@@ -73,9 +72,7 @@ import {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';
7372
7473import { ChainedInjector } from './chained_injector' ;
7574import { createElementNode , setupStaticAttributes } from './dom_node_manipulation' ;
76- import { AttributeMarker } from './interfaces/attribute_marker' ;
7775import { unregisterLView } from './interfaces/lview_tracking' ;
78- import { CssSelector } from './interfaces/projection' ;
7976import {
8077 extractAttrsAndClassesFromSelector ,
8178 stringifyCSSSelectorList ,
@@ -157,18 +154,6 @@ function getNamespace(elementName: string): string | null {
157154 return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null ;
158155}
159156
160- // TODO(pk): change the extractAttrsAndClassesFromSelector so it returns TAttributes already?
161- function getRootTAttributesFromSelector ( selector : CssSelector ) {
162- const { attrs, classes} = extractAttrsAndClassesFromSelector ( selector ) ;
163-
164- const tAtts : TAttributes = attrs ;
165- if ( classes . length ) {
166- tAtts . push ( AttributeMarker . Classes , ...classes ) ;
167- }
168-
169- return tAtts ;
170- }
171-
172157/**
173158 * ComponentFactory interface implementation.
174159 */
@@ -214,9 +199,7 @@ export class ComponentFactory<T> extends AbstractComponentFactory<T> {
214199 super ( ) ;
215200 this . componentType = componentDef . type ;
216201 this . selector = stringifyCSSSelectorList ( componentDef . selectors ) ;
217- this . ngContentSelectors = componentDef . ngContentSelectors
218- ? componentDef . ngContentSelectors
219- : [ ] ;
202+ this . ngContentSelectors = componentDef . ngContentSelectors ?? [ ] ;
220203 this . isBoundToModule = ! ! ngModule ;
221204 }
222205
@@ -369,7 +352,7 @@ export class ComponentFactory<T> extends AbstractComponentFactory<T> {
369352 const tAttributes = rootSelectorOrNode
370353 ? [ 'ng-version' , '0.0.0-PLACEHOLDER' ]
371354 : // Extract attributes and classes from the first selector only to match VE behavior.
372- getRootTAttributesFromSelector ( this . componentDef . selectors [ 0 ] ) ;
355+ extractAttrsAndClassesFromSelector ( this . componentDef . selectors [ 0 ] ) ;
373356
374357 // TODO: this logic is shared with the element instruction first create pass
375358 const hostTNode = getOrCreateTNode (
0 commit comments