Skip to content

Commit 08512ee

Browse files
crisbetopkozlowski-opensource
authored andcommitted
refactor(compiler): add flag to enable selectorless parsing (angular#60952)
Adds a flag to `parseTemplate` to enable selectorless. PR Close angular#60952
1 parent 6cce056 commit 08512ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/compiler/src/render3/view/template.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ export interface ParseTemplateOptions {
130130

131131
/** Whether the `@let` syntax is enabled. */
132132
enableLetSyntax?: boolean;
133+
134+
/** Whether the selectorless syntax is enabled. */
135+
enableSelectorless?: boolean;
133136
}
134137

135138
/**
@@ -153,6 +156,7 @@ export function parseTemplate(
153156
tokenizeExpansionForms: true,
154157
tokenizeBlocks: options.enableBlockSyntax ?? true,
155158
tokenizeLet: options.enableLetSyntax ?? true,
159+
selectorlessEnabled: options.enableSelectorless ?? false,
156160
});
157161

158162
if (

0 commit comments

Comments
 (0)