mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): Don't generate standalone: true for definitions (#58238)
The runtime default is now `standalone: true`. `ɵɵdefineComponent`, `ɵɵdefineDirective` and `ɵɵdefinePipe` now set `standalone` as `true` by default in the definitions. PR Close #58238
This commit is contained in:
committed by
Alex Rickabaugh
parent
18ddf0de76
commit
a10f7cfbc2
@@ -60,9 +60,8 @@ export function compilePipeFromMetadata(metadata: R3PipeMetadata): R3CompiledExp
|
||||
// e.g. `pure: true`
|
||||
definitionMapValues.push({key: 'pure', value: o.literal(metadata.pure), quoted: false});
|
||||
|
||||
// TODO: standalone as default value (invert the condition)
|
||||
if (metadata.isStandalone) {
|
||||
definitionMapValues.push({key: 'standalone', value: o.literal(true), quoted: false});
|
||||
if (metadata.isStandalone === false) {
|
||||
definitionMapValues.push({key: 'standalone', value: o.literal(false), quoted: false});
|
||||
}
|
||||
|
||||
const expression = o
|
||||
|
||||
@@ -93,8 +93,8 @@ function baseDirectiveFields(
|
||||
definitionMap.set('exportAs', o.literalArr(meta.exportAs.map((e) => o.literal(e))));
|
||||
}
|
||||
|
||||
if (meta.isStandalone) {
|
||||
definitionMap.set('standalone', o.literal(true));
|
||||
if (meta.isStandalone === false) {
|
||||
definitionMap.set('standalone', o.literal(false));
|
||||
}
|
||||
if (meta.isSignal) {
|
||||
definitionMap.set('signals', o.literal(true));
|
||||
|
||||
Reference in New Issue
Block a user