_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/break_different_instructions.ts_0_611
import {Component} from '@angular/core'; @Component({ template: `<div style.color="a{{one}}b" style.border="a{{one}}b" [class.apple]="yesToApple" [style.transition]="transition" [class.orange]="yesToOrange" [style.width]="width" style.height="a{{one}}b" style.top="a{{one}}b"></div>`, standalone: false }) export class MyComponent { one = ''; transition = 'all 1337ms ease'; width = '42px'; yesToApple = true; yesToOrange = true; }
{ "end_byte": 611, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/break_different_instructions.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/interpolations_different_arity.ts_0_401
import {Component} from '@angular/core'; @Component({ template: `<div style.color="a{{one}}b" style.border="a{{one}}b" style.transition="a{{one}}b{{two}}c" style.width="a{{one}}b{{two}}c" style.height="a{{one}}b{{two}}c{{three}}d" style.top="a{{one}}b{{two}}c{{three}}d"></div>`, standalone: false }) export class MyComponent { one = ''; two = ''; three = ''; }
{ "end_byte": 401, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/interpolations_different_arity.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/break_different_interpolation_instructions.ts_0_427
import {Component} from '@angular/core'; @Component({ template: `<div style.color="a{{one}}b" style.border="a{{one}}b" style.transition="a{{one}}b{{two}}c" style.width="a{{one}}b{{two}}c{{three}}d" style.height="a{{one}}b" style.top="a{{one}}b"></div>`, standalone: false }) export class MyComponent { one = ''; two = ''; three = ''; transition = 'all 1337ms ease'; width = '42px'; }
{ "end_byte": 427, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/chaining/break_different_interpolation_instructions.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/external_runtime_files.js_0_60
ɵɵExternalStylesFeature(["/style-A.css", "/style-B.css"])
{ "end_byte": 60, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/external_runtime_files.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js_0_7066
/**************************************************************************************************** * PARTIAL FILE: encapsulation_default.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '...', isInline: true, styles: ["div.foo { color: red; }", ":host p:nth-child(even) { --webkit-transition: 1s linear all; }"] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: '...', standalone: false, styles: ["div.foo { color: red; }", ":host p:nth-child(even) { --webkit-transition: 1s linear all; }"] }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: encapsulation_default.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: encapsulation_emulated.js ****************************************************************************************************/ import { Component, NgModule, ViewEncapsulation } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '...', isInline: true, styles: ["div.bar { color: blue; }\n", "div.baz { color: purple; }\n", "div.foo { color: red; }", ":host p:nth-child(even) { --webkit-transition: 1s linear all; }"] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', encapsulation: ViewEncapsulation.Emulated, standalone: false, template: '...', styles: ["div.bar { color: blue; }\n", "div.baz { color: purple; }\n", "div.foo { color: red; }", ":host p:nth-child(even) { --webkit-transition: 1s linear all; }"] }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: encapsulation_emulated.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: encapsulation_none.js ****************************************************************************************************/ import { Component, NgModule, ViewEncapsulation } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '...', isInline: true, styles: ["div.tall { height: 123px; }", ":host.small p { height:5px; }"], encapsulation: i0.ViewEncapsulation.None }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', encapsulation: ViewEncapsulation.None, template: '...', standalone: false, styles: ["div.tall { height: 123px; }", ":host.small p { height:5px; }"] }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER
{ "end_byte": 7066, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js_7067_13638
, ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: encapsulation_none.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: encapsulation_shadow_dom.js ****************************************************************************************************/ import { Component, NgModule, ViewEncapsulation } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '...', isInline: true, styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"], encapsulation: i0.ViewEncapsulation.ShadowDom }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ encapsulation: ViewEncapsulation.ShadowDom, selector: 'my-component', template: '...', standalone: false, styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"] }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: encapsulation_shadow_dom.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: external_runtime_files.js ****************************************************************************************************/ import { Component, NgModule, ViewEncapsulation } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '...', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', encapsulation: ViewEncapsulation.Emulated, template: '...', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: external_runtime_files.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 13638, "start_byte": 7067, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/style-B.css_0_27
div.baz { color: purple; }
{ "end_byte": 27, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/style-B.css" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_shadow_dom.ts_0_381
import {Component, NgModule, ViewEncapsulation} from '@angular/core'; @Component({ encapsulation: ViewEncapsulation.ShadowDom, selector: 'my-component', styles: ['div.cool { color: blue; }', ':host.nice p { color: gold; }'], template: '...', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 381, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_shadow_dom.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/style-A.css_0_25
div.bar { color: blue; }
{ "end_byte": 25, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/style-A.css" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_default.ts_0_360
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', styles: [ 'div.foo { color: red; }', ':host p:nth-child(even) { --webkit-transition: 1s linear all; }' ], template: '...', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 360, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_default.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_emulated.js_0_157
["div.bar { color: blue; }\n", "div.baz { color: purple; }\n", "div.foo { color: red; }", ":host p:nth-child(even) { --webkit-transition: 1s linear all; }"]
{ "end_byte": 157, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_emulated.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_none.ts_0_378
import {Component, NgModule, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'my-component', encapsulation: ViewEncapsulation.None, styles: ['div.tall { height: 123px; }', ':host.small p { height:5px; }'], template: '...', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 378, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_none.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_shadow_dom.js_0_166
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ // ... styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"], encapsulation: 3 })
{ "end_byte": 166, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_shadow_dom.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_default.js_0_153
styles: ["div.foo[_ngcontent-%COMP%] { color: red; }", "[_nghost-%COMP%] p[_ngcontent-%COMP%]:nth-child(even) { --webkit-transition: 1s linear all; }"]
{ "end_byte": 153, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_default.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_emulated.ts_0_459
import {Component, NgModule, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'my-component', encapsulation: ViewEncapsulation.Emulated, standalone: false, styles: [ 'div.foo { color: red; }', ':host p:nth-child(even) { --webkit-transition: 1s linear all; }' ], styleUrls: ['./style-A.css', './style-B.css'], template: '...' }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 459, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/encapsulation_emulated.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/external_runtime_files.ts_0_346
import {Component, NgModule, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'my-component', encapsulation: ViewEncapsulation.Emulated, styleUrls: ['./style-A.css', './style-B.css'], template: '...', standalone: false, }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 346, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_styles/external_runtime_files.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata_empty.js_0_275
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ type: MyComponent, selectors:[["my-component"]], standalone: false, decls: 0, vars: 0, template: function MyComponent_Template(rf, $ctx$) { }, encapsulation: 2, data: { animation: [] } });
{ "end_byte": 275, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata_empty.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_listeners.js_0_647
// ... MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ // ... decls: 1, vars: 1, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵelementStart(0, "div"); $r3$.ɵɵlistener("@myAnimation.start", function MyComponent_Template_div_animation_myAnimation_start_0_listener($event) { return ctx.onStart($event); })("@myAnimation.done", function MyComponent_Template_div_animation_myAnimation_done_0_listener($event) { return ctx.onDone($event); }); $r3$.ɵɵelementEnd(); } if (rf & 2) { $r3$.ɵɵproperty("@myAnimation", ctx.exp); } }, encapsulation: 2, // ... });
{ "end_byte": 647, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_listeners.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_host_bindings.js_0_522
MyAnimDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ // ... hostVars: 1, hostBindings: function MyAnimDir_HostBindings(rf, ctx) { if (rf & 1) { $r3$.ɵɵsyntheticHostListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler() { return ctx.onStart(); })("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler() { return ctx.onDone(); }); } if (rf & 2) { $r3$.ɵɵsyntheticHostProperty("@myAnim", ctx.myAnimState); } } // ... });
{ "end_byte": 522, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_host_bindings.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_property_bindings.ts_0_320
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', template: ` <div [@foo]='exp'></div> <div @bar></div> <div [@baz]></div>`, standalone: false }) export class MyComponent { exp = ''; } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 320, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_property_bindings.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js_0_7552
/**************************************************************************************************** * PARTIAL FILE: metadata.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '', isInline: true, animations: [{ name: 'foo123' }, { name: 'trigger123' }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', animations: [{ name: 'foo123' }, { name: 'trigger123' }], template: '', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: metadata.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: metadata_empty.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: '', isInline: true, animations: [] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', animations: [], template: '', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: metadata_empty.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: animation_property_bindings.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { constructor() { this.exp = ''; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: ` <div [@foo]='exp'></div> <div @bar></div> <div [@baz]></div>`, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: ` <div [@foo]='exp'></div> <div @bar></div> <div [@baz]></div>`, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: animation_property_bindings.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { exp: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDecla
{ "end_byte": 7552, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js_7557_14663
n<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: animation_listeners.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; class MyComponent { onStart(event) { this.startEvent = event; } onDone(event) { this.doneEvent = event; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-cmp", ngImport: i0, template: ` <div [@myAnimation]="exp" (@myAnimation.start)="onStart($event)" (@myAnimation.done)="onDone($event)"></div> `, isInline: true, animations: [ trigger('myAnimation', [ transition('* => state', [style({ 'opacity': '0' }), animate(500, style({ 'opacity': '1' }))]), ]), ] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-cmp', template: ` <div [@myAnimation]="exp" (@myAnimation.start)="onStart($event)" (@myAnimation.done)="onDone($event)"></div> `, animations: [ trigger('myAnimation', [ transition('* => state', [style({ 'opacity': '0' }), animate(500, style({ 'opacity': '1' }))]), ]), ], standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: animation_listeners.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: animation_host_bindings.js ****************************************************************************************************/ import { Component, Directive, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; class MyAnimDir { constructor() { this.myAnimState = '123'; } onStart() { } onDone() { } } MyAnimDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAnimDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); MyAnimDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyAnimDir, isStandalone: false, selector: "[my-anim-dir]", host: { listeners: { "@myAnim.start": "onStart()", "@myAnim.done": "onDone()" }, properties: { "@myAnim": "myAnimState" } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAnimDir, decorators: [{ type: Directive, args: [{ selector: '[my-anim-dir]', host: { '[@myAnim]': 'myAnimState', '(@myAnim.start)': 'onStart()', '(@myAnim.done)': 'onDone()' }, standalone: false }] }] }); class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-cmp", ngImport: i0, template: ` <div my-anim-dir></div> `, isInline: true, dependencies: [{ kind: "directive", type: MyAnimDir, selector: "[my-anim-dir]" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-cmp', template: ` <div my-anim-dir></div> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, MyAnimDir] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent, MyAnimDir] }] }] }); /**************************************************************************************************** * PARTIAL FILE: animation_host_bindings.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent, typeof MyAnimDir], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 14663, "start_byte": 7557, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata.js_0_313
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ type: MyComponent, selectors:[["my-component"]], standalone: false, decls: 0, vars: 0, template: function MyComponent_Template(rf, $ctx$) { }, encapsulation: 2, data: { animation: [{name: 'foo123'}, {name: 'trigger123'}] } });
{ "end_byte": 313, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_host_bindings.ts_0_521
import {Component, Directive, NgModule} from '@angular/core'; @Directive({ selector: '[my-anim-dir]', host: { '[@myAnim]': 'myAnimState', '(@myAnim.start)': 'onStart()', '(@myAnim.done)': 'onDone()' }, standalone: false }) class MyAnimDir { onStart() {} onDone() {} myAnimState = '123'; } @Component({ selector: 'my-cmp', template: ` <div my-anim-dir></div> `, standalone: false }) class MyComponent { } @NgModule({declarations: [MyComponent, MyAnimDir]}) export class MyModule { }
{ "end_byte": 521, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_host_bindings.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_property_bindings.js_0_468
// ... MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ // ... decls: 3, vars: 3, template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { $r3$.ɵɵelement(0, "div")(1, "div")(2, "div"); } if (rf & 2) { $r3$.ɵɵproperty("@foo", ctx.exp); $r3$.ɵɵadvance(); $r3$.ɵɵproperty("@bar", undefined); $r3$.ɵɵadvance(); $r3$.ɵɵproperty("@baz", undefined); } }, encapsulation: 2 });
{ "end_byte": 468, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_property_bindings.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata_empty.ts_0_247
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', animations: [], template: '', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 247, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata_empty.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_listeners.ts_0_809
import {Component, NgModule} from '@angular/core'; declare const animate: any; declare const style: any; declare const trigger: any; declare const transition: any; @Component({ selector: 'my-cmp', template: ` <div [@myAnimation]="exp" (@myAnimation.start)="onStart($event)" (@myAnimation.done)="onDone($event)"></div> `, animations: [ trigger('myAnimation', [ transition('* => state', [style({ 'opacity': '0' }), animate(500, style({ 'opacity': '1' }))]), ]), ], standalone: false }) class MyComponent { exp: any; startEvent: any; doneEvent: any; onStart(event: any) { this.startEvent = event; } onDone(event: any) { this.doneEvent = event; } } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 809, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/animation_listeners.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata.ts_0_294
import {Component, NgModule} from '@angular/core'; @Component( { selector: 'my-component', animations: [{ name: 'foo123' }, { name: 'trigger123' }], template: '', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 294, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/component_animations/metadata.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/directive_host_binding_slots.js_0_263
hostVars: 6, hostBindings: function WidthDirective_HostBindings(rf, ctx) { if (rf & 2) { $r3$.ɵɵhostProperty("id", ctx.id)("title", ctx.title); $r3$.ɵɵstyleProp("width", ctx.myWidth); $r3$.ɵɵclassProp("foo", ctx.myFooClass); } }
{ "end_byte": 263, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/directive_host_binding_slots.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/host_binding_slots.ts_0_662
import {Component, Directive, NgModule} from '@angular/core'; @Directive({ selector: '[my-dir]', host: { '[title]': 'title', '[class.foo]': 'foo', '[@anim]': `{ value: _animValue, params: { param1: _animParam1, param2: _animParam2 } }` }, standalone: false }) export class MyDir { title = ''; foo = true; _animValue = null; _animParam1 = null; _animParam2 = null; } @Component({ selector: 'my-app', template: ` <div my-dir></div> `, standalone: false }) export class MyAppComp { } @NgModule({declarations: [MyAppComp, MyDir]}) export class MyModule { }
{ "end_byte": 662, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/host_binding_slots.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js_0_7857
/**************************************************************************************************** * PARTIAL FILE: component_host_binding_slots.js ****************************************************************************************************/ import { Component, HostBinding, Input, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { constructor() { this.myStyle = { width: '100px' }; this.myClass = { bar: false }; this.id = 'some id'; this.title = 'some title'; this.name = ''; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", inputs: { name: "name" }, host: { attributes: { "title": "foo title" }, properties: { "style": "this.myStyle", "class": "this.myClass", "id": "this.id", "title": "this.title" }, styleAttribute: "width:200px; height:500px", classAttribute: "foo baz" }, ngImport: i0, template: '', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: '', host: { 'style': 'width:200px; height:500px', 'class': 'foo baz', 'title': 'foo title' }, standalone: false }] }], propDecorators: { myStyle: [{ type: HostBinding, args: ['style'] }], myClass: [{ type: HostBinding, args: ['class'] }], id: [{ type: HostBinding, args: ['id'] }], title: [{ type: HostBinding, args: ['title'] }], name: [{ type: Input, args: ['name'] }] } }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: component_host_binding_slots.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { myStyle: { width: string; }; myClass: { bar: boolean; }; id: string; title: string; name: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, { "name": { "alias": "name"; "required": false; }; }, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: directive_host_binding_slots.js ****************************************************************************************************/ import { Directive, HostBinding } from '@angular/core'; import * as i0 from "@angular/core"; export class WidthDirective { constructor() { this.myWidth = 200; this.myFooClass = true; this.id = 'some id'; this.title = 'some title'; } } WidthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: WidthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); WidthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: WidthDirective, isStandalone: false, selector: "[myWidthDir]", host: { properties: { "style.width": "this.myWidth", "class.foo": "this.myFooClass", "id": "this.id", "title": "this.title" } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: WidthDirective, decorators: [{ type: Directive, args: [{ selector: '[myWidthDir]', standalone: false }] }], propDecorators: { myWidth: [{ type: HostBinding, args: ['style.width'] }], myFooClass: [{ type: HostBinding, args: ['class.foo'] }], id: [{ type: HostBinding, args: ['id'] }], title: [{ type: HostBinding, args: ['title'] }] } }); /**************************************************************************************************** * PARTIAL FILE: directive_host_binding_slots.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class WidthDirective { myWidth: number; myFooClass: boolean; id: string; title: string; static ɵfac: i0.ɵɵFactoryDeclaration<WidthDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<WidthDirective, "[myWidthDir]", never, {}, {}, never, never, false, never>; } /**************************************************************************************************** * PARTIAL FILE: host_binding_slots.js ****************************************************************************************************/ import { Component, Directive, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyDir { constructor() { this.title = ''; this.foo = true; this._animValue = null; this._animParam1 = null; this._animParam2 = null; } } MyDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); MyDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyDir, isStandalone: false, selector: "[my-dir]", host: { properties: { "title": "title", "class.foo": "foo", "@anim": "{\n value: _animValue,\n params: {\n param1: _animParam1,\n param2: _animParam2\n }\n }" } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyDir, decorators: [{ type: Directive, args: [{ selector: '[my-dir]', host: { '[title]': 'title', '[class.foo]': 'foo', '[@anim]': `{ value: _animValue, params: { param1: _animParam1, param2: _animParam2 } }` }, standalone: false }] }] }); export class MyAppComp { } MyAppComp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0",
{ "end_byte": 7857, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js_7858_10469
ersion: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAppComp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyAppComp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyAppComp, isStandalone: false, selector: "my-app", ngImport: i0, template: ` <div my-dir></div> `, isInline: true, dependencies: [{ kind: "directive", type: MyDir, selector: "[my-dir]" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAppComp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: ` <div my-dir></div> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyAppComp, MyDir] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyAppComp, MyDir] }] }] }); /**************************************************************************************************** * PARTIAL FILE: host_binding_slots.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyDir { title: string; foo: boolean; _animValue: null; _animParam1: null; _animParam2: null; static ɵfac: i0.ɵɵFactoryDeclaration<MyDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MyDir, "[my-dir]", never, {}, {}, never, never, false, never>; } export declare class MyAppComp { static ɵfac: i0.ɵɵFactoryDeclaration<MyAppComp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyAppComp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyAppComp, typeof MyDir], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 10469, "start_byte": 7858, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/component_host_binding_slots.ts_0_564
import {Component, HostBinding, Input, NgModule} from '@angular/core'; @Component({ selector: 'my-component', template: '', host: { 'style': 'width:200px; height:500px', 'class': 'foo baz', 'title': 'foo title' }, standalone: false }) export class MyComponent { @HostBinding('style') myStyle = {width: '100px'}; @HostBinding('class') myClass = {bar: false}; @HostBinding('id') id = 'some id'; @HostBinding('title') title = 'some title'; @Input('name') name = ''; } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 564, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/component_host_binding_slots.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/directive_host_binding_slots.ts_0_333
import {Directive, HostBinding} from '@angular/core'; @Directive({ selector: '[myWidthDir]', standalone: false }) export class WidthDirective { @HostBinding('style.width') myWidth = 200; @HostBinding('class.foo') myFooClass = true; @HostBinding('id') id = 'some id'; @HostBinding('title') title = 'some title'; }
{ "end_byte": 333, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/directive_host_binding_slots.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/component_host_binding_slots.js_0_370
hostAttrs: ["title", "foo title", __AttributeMarker.Classes__, "foo", "baz", __AttributeMarker.Styles__, "width", "200px", "height", "500px"], hostVars: 6, hostBindings: function MyComponent_HostBindings(rf, ctx) { if (rf & 2) { $r3$.ɵɵhostProperty("id", ctx.id)("title", ctx.title); $r3$.ɵɵstyleMap(ctx.myStyle); $r3$.ɵɵclassMap(ctx.myClass); } }
{ "end_byte": 370, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/component_host_binding_slots.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/host_binding_slots.js_0_347
hostVars: 10, hostBindings: function MyDir_HostBindings(rf, ctx) { if (rf & 2) { $r3$.ɵɵhostProperty("title", ctx.title); $r3$.ɵɵsyntheticHostProperty("@anim", $r3$.ɵɵpureFunction2(7, _c1, ctx._animValue, $r3$.ɵɵpureFunction2(4, _c0, ctx._animParam1, ctx._animParam2))); $r3$.ɵɵclassProp("foo", ctx.foo); } }
{ "end_byte": 347, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/binding_slots/host_binding_slots.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_slots.ts_0_675
import {Component, NgModule, Pipe} from '@angular/core'; @Pipe({ name: 'pipe', standalone: false }) export class PipePipe { transform(v: any) {} } @Component({ selector: 'my-component', template: ` <div [class]="{}" [class.foo]="fooExp | pipe:2000" [style]="myStyleExp | pipe:1000" [style.bar]="barExp | pipe:3000" [style.baz]="bazExp | pipe:4000"> {{ item }}</div>`, standalone: false }) export class MyComponent { myStyleExp = {}; fooExp = 'foo'; barExp = 'bar'; bazExp = 'baz'; items = [1, 2, 3]; item = 1; } @NgModule({declarations: [MyComponent, PipePipe]}) export class MyModule { }
{ "end_byte": 675, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_slots.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings.pipeline.js_0_326
template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { $r3$.ɵɵelement(0, "div"); $r3$.ɵɵpipe(1, "stylePipe"); $r3$.ɵɵpipe(2, "classPipe"); } if (rf & 2) { $r3$.ɵɵstyleMap($r3$.ɵɵpipeBind1(1, 4, $ctx$.myStyleExp)); $r3$.ɵɵclassMap($r3$.ɵɵpipeBind1(2, 6, $ctx$.myClassExp)); } }
{ "end_byte": 326, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings.pipeline.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/multiple_elements.ts_0_440
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', template: ` <div [style.width]="w1"></div> <div [style.height]="h1"></div> <div [class.active]="a1"></div> <div [class.removed]="r1"></div> `, standalone: false }) export class MyComponent { w1 = '100px'; h1 = '100px'; a1 = true; r1 = true; } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 440, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/multiple_elements.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js_0_7164
/**************************************************************************************************** * PARTIAL FILE: mixed.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { constructor() { this.myStyleExp = [{ color: 'red' }, { color: 'blue', duration: 1000 }]; this.myClassExp = 'foo bar apple'; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: `<div [style]="myStyleExp" [class]="myClassExp"></div>`, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: `<div [style]="myStyleExp" [class]="myClassExp"></div>`, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: mixed.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { myStyleExp: ({ color: string; duration?: undefined; } | { color: string; duration: number; })[]; myClassExp: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: pipe_bindings.js ****************************************************************************************************/ import { Component, NgModule, Pipe } from '@angular/core'; import * as i0 from "@angular/core"; export class StylePipe { transform(v) { } } StylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: StylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); StylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: StylePipe, isStandalone: false, name: "stylePipe" }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: StylePipe, decorators: [{ type: Pipe, args: [{ name: 'stylePipe', standalone: false }] }] }); export class ClassPipe { transform(v) { } } ClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: ClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); ClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: ClassPipe, isStandalone: false, name: "classPipe" }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: ClassPipe, decorators: [{ type: Pipe, args: [{ name: 'classPipe', standalone: false }] }] }); export class MyComponent { constructor() { this.myStyleExp = [{ color: 'red' }, { color: 'blue', duration: 1000 }]; this.myClassExp = 'foo bar apple'; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: `<div [style]="myStyleExp | stylePipe" [class]="myClassExp | classPipe"></div>`, isInline: true, dependencies: [{ kind: "pipe", type: StylePipe, name: "stylePipe" }, { kind: "pipe", type: ClassPipe, name: "classPipe" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: `<div [style]="myStyleExp | stylePipe" [class]="myClassExp | classPipe"></div>`, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, StylePipe, ClassPipe] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent, StylePipe, ClassPipe] }] }] }); /**************************************************************************************************** * PARTIAL FILE: pipe_bindings.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class StylePipe { transform(v: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<StylePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<StylePipe, "stylePipe", false>; } export declare class ClassPipe { transform(v: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<ClassPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<ClassPipe, "classPipe", false>; } export d
{ "end_byte": 7164, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js_7165_13922
clare class MyComponent { myStyleExp: ({ color: string; duration?: undefined; } | { color: string; duration: number; })[]; myClassExp: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent, typeof StylePipe, typeof ClassPipe], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: pipe_bindings_slots.js ****************************************************************************************************/ import { Component, NgModule, Pipe } from '@angular/core'; import * as i0 from "@angular/core"; export class PipePipe { transform(v) { } } PipePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: PipePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); PipePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: PipePipe, isStandalone: false, name: "pipe" }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: PipePipe, decorators: [{ type: Pipe, args: [{ name: 'pipe', standalone: false }] }] }); export class MyComponent { constructor() { this.myStyleExp = {}; this.fooExp = 'foo'; this.barExp = 'bar'; this.bazExp = 'baz'; this.items = [1, 2, 3]; this.item = 1; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: ` <div [class]="{}" [class.foo]="fooExp | pipe:2000" [style]="myStyleExp | pipe:1000" [style.bar]="barExp | pipe:3000" [style.baz]="bazExp | pipe:4000"> {{ item }}</div>`, isInline: true, dependencies: [{ kind: "pipe", type: PipePipe, name: "pipe" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: ` <div [class]="{}" [class.foo]="fooExp | pipe:2000" [style]="myStyleExp | pipe:1000" [style.bar]="barExp | pipe:3000" [style.baz]="bazExp | pipe:4000"> {{ item }}</div>`, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent, PipePipe] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent, PipePipe] }] }] }); /**************************************************************************************************** * PARTIAL FILE: pipe_bindings_slots.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class PipePipe { transform(v: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<PipePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<PipePipe, "pipe", false>; } export declare class MyComponent { myStyleExp: {}; fooExp: string; barExp: string; bazExp: string; items: number[]; item: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent, typeof PipePipe], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: multiple_elements.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyComponent { constructor() { this.w1 = '100px'; this.h1 = '100px'; this.a1 = true; this.r1 = true; } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: ` <div [style.width]="w1"></div> <div [style.height]="h1"></div> <div [class.active]="a1"></div> <div [class.removed]="r1"></div> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: ` <div [style.width]="w1"></div> <div [style.height]="h1"></div> <div [class.active]="a1"></div> <div [class.removed]="r1"></div> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector
{ "end_byte": 13922, "start_byte": 7165, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js_13923_15230
{ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: multiple_elements.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { w1: string; h1: string; a1: boolean; r1: boolean; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 15230, "start_byte": 13923, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/mixed.ts_0_386
import {Component, NgModule} from '@angular/core'; @Component( { selector: 'my-component', template: `<div [style]="myStyleExp" [class]="myClassExp"></div>`, standalone: false }) export class MyComponent { myStyleExp = [{color: 'red'}, {color: 'blue', duration: 1000}] myClassExp = 'foo bar apple'; } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 386, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/mixed.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/multiple_elements.js_0_339
// ... template: function MyComponent_Template(rf, $ctx$) { // ... if (rf & 2) { $r3$.ɵɵstyleProp("width", $ctx$.w1); $r3$.ɵɵadvance(); $r3$.ɵɵstyleProp("height", $ctx$.h1); $r3$.ɵɵadvance(); $r3$.ɵɵclassProp("active", $ctx$.a1); $r3$.ɵɵadvance(); $r3$.ɵɵclassProp("removed", $ctx$.r1); } }
{ "end_byte": 339, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/multiple_elements.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_slots.js_0_717
template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { $r3$.ɵɵelementStart(0, "div"); $r3$.ɵɵpipe(1, "pipe"); $r3$.ɵɵpipe(2, "pipe"); $r3$.ɵɵpipe(3, "pipe"); $r3$.ɵɵpipe(4, "pipe"); $r3$.ɵɵtext(5); $r3$.ɵɵelementEnd(); } if (rf & 2) { $r3$.ɵɵstyleMap($r3$.ɵɵpipeBind2(1, 11, $ctx$.myStyleExp, 1000)); $r3$.ɵɵclassMap($r3$.ɵɵpureFunction0(23, _c0)); $r3$.ɵɵstyleProp("bar", $r3$.ɵɵpipeBind2(2, 14, $ctx$.barExp, 3000))("baz", $r3$.ɵɵpipeBind2(3, 17, $ctx$.bazExp, 4000)); $r3$.ɵɵclassProp("foo", $r3$.ɵɵpipeBind2(4, 20, $ctx$.fooExp, 2000)); $r3$.ɵɵadvance(5); $r3$.ɵɵtextInterpolate1(" ", $ctx$.item, ""); } }
{ "end_byte": 717, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings_slots.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings.ts_0_651
import {Component, NgModule, Pipe} from '@angular/core'; @Pipe({ name: 'stylePipe', standalone: false }) export class StylePipe { transform(v: any) {} } @Pipe({ name: 'classPipe', standalone: false }) export class ClassPipe { transform(v: any) {} } @Component({ selector: 'my-component', template: `<div [style]="myStyleExp | stylePipe" [class]="myClassExp | classPipe"></div>`, standalone: false }) export class MyComponent { myStyleExp = [{color: 'red'}, {color: 'blue', duration: 1000}] myClassExp = 'foo bar apple'; } @NgModule({declarations: [MyComponent, StylePipe, ClassPipe]}) export class MyModule { }
{ "end_byte": 651, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/pipe_bindings.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/mixed.js_0_209
template: function MyComponent_Template(rf, $ctx$) { if (rf & 1) { $r3$.ɵɵelement(0, "div"); } if (rf & 2) { $r3$.ɵɵstyleMap($ctx$.myStyleExp); $r3$.ɵɵclassMap($ctx$.myClassExp); } }
{ "end_byte": 209, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_styling/mixed_style_and_class/mixed.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/operators_template.js_0_499
template: function MyApp_Template(rf, $ctx$) { if (rf & 1) { $i0$.ɵɵtext(0); i0.ɵɵpipe(1, "identity"); } if (rf & 2) { i0.ɵɵtextInterpolate7(" ", 1 + 2, " ", 1 % 2 + 3 / 4 * 5, " ", +1, " ", typeof i0.ɵɵpureFunction0(9, _c0) === "object", " ", !(typeof i0.ɵɵpureFunction0(10, _c0) === "object"), " ", typeof (ctx.foo == null ? null : ctx.foo.bar) === "string", " ", i0.ɵɵpipeBind1(1, 7, typeof (ctx.foo == null ? null : ctx.foo.bar)), " " ); } }
{ "end_byte": 499, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/operators_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/operators.ts_0_480
import {Component, Pipe} from '@angular/core'; @Pipe({name: 'identity'}) export class IdentityPipe { transform(value: any) { return value; } } @Component({ template: ` {{ 1 + 2 }} {{ (1 % 2) + 3 / 4 * 5 }} {{ +1 }} {{ typeof {} === 'object' }} {{ !(typeof {} === 'object') }} {{ typeof foo?.bar === 'string' }} {{ typeof foo?.bar | identity }} `, imports: [IdentityPipe], }) export class MyApp { foo: {bar?: string} = {bar: 'baz'}; }
{ "end_byte": 480, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/operators.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js_0_7100
/**************************************************************************************************** * PARTIAL FILE: todo_example.js ****************************************************************************************************/ import { Component, Input, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.list = []; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: '<todo [data]="list"></todo>', isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => TodoComponent), selector: "todo", inputs: ["data"] }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: '<todo [data]="list"></todo>', standalone: false }] }] }); export class TodoComponent { constructor() { this.data = []; } } TodoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); TodoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TodoComponent, isStandalone: false, selector: "todo", inputs: { data: "data" }, ngImport: i0, template: '<ul class="list" [title]="myTitle"><li *ngFor="let item of data">{{data}}</li></ul>', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoComponent, decorators: [{ type: Component, args: [{ selector: 'todo', template: '<ul class="list" [title]="myTitle"><li *ngFor="let item of data">{{data}}</li></ul>', standalone: false }] }], propDecorators: { data: [{ type: Input }] } }); export class TodoModule { } TodoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); TodoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule, declarations: [TodoComponent, MyApp] }); TodoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TodoModule, decorators: [{ type: NgModule, args: [{ declarations: [TodoComponent, MyApp], }] }] }); /**************************************************************************************************** * PARTIAL FILE: todo_example.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { list: any[]; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class TodoComponent { data: any[]; myTitle: string; static ɵfac: i0.ɵɵFactoryDeclaration<TodoComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TodoComponent, "todo", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>; } export declare class TodoModule { static ɵfac: i0.ɵɵFactoryDeclaration<TodoModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<TodoModule, [typeof TodoComponent, typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<TodoModule>; } /**************************************************************************************************** * PARTIAL FILE: operators.js ****************************************************************************************************/ import { Component, Pipe } from '@angular/core'; import * as i0 from "@angular/core"; export class IdentityPipe { transform(value) { return value; } } IdentityPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: IdentityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); IdentityPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: IdentityPipe, isStandalone: true, name: "identity" }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: IdentityPipe, decorators: [{ type: Pipe, args: [{ name: 'identity' }] }] }); export class MyApp { constructor() { this.foo = { bar: 'baz' }; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` {{ 1 + 2 }} {{ (1 % 2) + 3 / 4 * 5 }} {{ +1 }} {{ typeof {} === 'object' }} {{ !(typeof {} === 'object') }} {{ typeof foo?.bar === 'string' }} {{ typeof foo?.bar | identity }} `, isInline: true, dependencies: [{ kind: "pipe", type: IdentityPipe, name: "identity" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{ 1 + 2 }} {{ (1 % 2) + 3 / 4 * 5 }} {{ +1 }} {{ typeof {} === 'object' }} {{ !(typeof {} === 'object') }} {{ typeof foo?.bar === 'string' }} {{ typeof foo?.bar | identity }} `, imports: [IdentityPipe], }] }] }); /**************************************************************************************************** * PARTIAL FILE: operators.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class IdentityPipe { transform(value: any): any; static ɵfac: i0.ɵɵFactoryDeclaration<IdentityPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<IdentityPipe, "identity", true>; } export declare class MyApp { foo: { bar?: string; }; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; }
{ "end_byte": 7100, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/todo_example_template.js_0_110
import { Component, Input, NgModule } from '@angular/core'; … MyApp.ɵcmp = …; TodoComponent.ɵcmp = …;
{ "end_byte": 110, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/todo_example_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/todo_example.ts_0_532
import {Component, Input, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: '<todo [data]="list"></todo>', standalone: false }) export class MyApp { list: any[] = []; } @Component({ selector: 'todo', template: '<ul class="list" [title]="myTitle"><li *ngFor="let item of data">{{data}}</li></ul>', standalone: false }) export class TodoComponent { @Input() data: any[] = []; myTitle!: string; } @NgModule({ declarations: [TodoComponent, MyApp], }) export class TodoModule { }
{ "end_byte": 532, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/todo_example.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/test.js_0_107
import { Component, NgModule } from '@angular/core'; … MyComponent.ɵfac = …; MyComponent.ɵcmp = …;
{ "end_byte": 107, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/test.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js_0_2861
/**************************************************************************************************** * PARTIAL FILE: test.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; class Greeter { } class GreeterEN { greet() { return 'Hi'; } } export class MyComponent { } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", providers: [GreeterEN, { provide: Greeter, useClass: GreeterEN }], ngImport: i0, template: '<div></div>', isInline: true, viewProviders: [GreeterEN] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{ type: Component, args: [{ selector: 'my-component', template: '<div></div>', providers: [GreeterEN, { provide: Greeter, useClass: GreeterEN }], viewProviders: [GreeterEN], standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent] }] }] }); /**************************************************************************************************** * PARTIAL FILE: test.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 2861, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/test.ts_0_478
import {Component, NgModule} from '@angular/core'; abstract class Greeter { abstract greet(): string; } class GreeterEN implements Greeter { greet() { return 'Hi'; } } @Component({ selector: 'my-component', template: '<div></div>', providers: [GreeterEN, { provide: Greeter, useClass: GreeterEN }], viewProviders: [GreeterEN], standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 478, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/hello_world/test.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null.ts_0_369
import {Component, NgModule} from '@angular/core'; @Component({ template: ` {{ val?.foo!.bar }} {{ val?.[0].foo!.bar }} {{ foo(val)?.foo!.bar }} {{ $any(val)?.foo!.bar }} `, standalone: false }) export class MyApp { val: any = null; foo(val: unknown) { return val; } } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 369, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_method_call.js_0_978
template: function MyApp_Template(rf, $ctx$) { if (rf & 1) { // ... } if (rf & 2) { let $tmp_0_0$; let $tmp_1_0$; let $tmp_2_0$; $i0$.ɵɵproperty("title", $ctx$.person == null ? null : $ctx$.person.getName(false)); $i0$.ɵɵadvance(); $i0$.ɵɵproperty("title", ($ctx$.person == null ? null : $ctx$.person.getName(false)) || ""); $i0$.ɵɵadvance(); $i0$.ɵɵproperty("title", $ctx$.person == null ? null : ($tmp_0_0$ = $ctx$.person.getName(false)) == null ? null : $tmp_0_0$.toLowerCase()); $i0$.ɵɵadvance(); $i0$.ɵɵproperty("title", $ctx$.person == null ? null : $ctx$.person.getName(($tmp_1_0$ = $ctx$.config.get("title")) == null ? null : $tmp_1_0$.enabled)); $i0$.ɵɵadvance(); $i0$.ɵɵproperty("title", $ctx$.person == null ? null : $ctx$.person.getName(($tmp_2_0$ = ($tmp_2_0$ = $ctx$.config.get("title")) == null ? null : $tmp_2_0$.enabled) !== null && $tmp_2_0$ !== undefined ? $tmp_2_0$ : true)); } }
{ "end_byte": 978, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_method_call.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null_template.pipeline.js_0_391
template: function MyApp_Template(rf, $ctx$) { if (rf & 1) { i0.ɵɵtext(0); } if (rf & 2) { let $tmp_0_0$; i0.ɵɵtextInterpolate4(" ", $ctx$.val == null ? null : $ctx$.val.foo.bar, " ", $ctx$.val == null ? null : $ctx$.val[0].foo.bar, " ", ($tmp_0_0$ = $ctx$.foo($ctx$.val)) == null ? null : $tmp_0_0$.foo.bar, " ", $ctx$.val == null ? null : $ctx$.val.foo.bar, " "); } }
{ "end_byte": 391, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_non_null_template.pipeline.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call.ts_0_566
import {Component, NgModule} from '@angular/core'; @Component({ template: ` <span [title]="'Your last name is ' + (person.getLastName?.() ?? 'unknown')"> Hello, {{ person.getName?.() }}! You are a Balrog: {{ person.getSpecies?.()?.()?.()?.()?.() || 'unknown' }} </span> `, standalone: false }) export class MyApp { person: { getName: () => string, getLastName?: () => string, getSpecies?: () => () => () => () => () => string, } = {getName: () => 'Bilbo'}; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 566, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_temporaries.ts_0_633
import {Component, NgModule} from '@angular/core'; @Component({ template: ` <span>Safe Property with Calls: {{ p()?.a()?.b()?.c()?.d() }}</span> <span>Safe and Unsafe Property with Calls: {{ p?.a()?.b().c().d()?.e()?.f?.g.h?.i()?.j()?.k().l }}</span> <span>Nested Safe with Calls: {{ f1()?.[f2()?.a]?.b }}</span> <span>Deep Nested Safe with Calls: {{ f1()?.[f2()?.f3()?.[f4()?.f5()]]?.f6() }}</span> `, standalone: false }) export class MyApp { p: any = null; f1(): any {} f2(): any {} f3(): any {} f4(): any {} f5(): any {} f6(): any {} } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 633, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_temporaries.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js_0_6940
/**************************************************************************************************** * PARTIAL FILE: safe_keyed_read.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.unknownNames = null; this.knownNames = [['Frodo', 'Bilbo']]; this.species = null; this.keys = null; this.speciesMap = { key: 'unknown' }; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` <span [title]="'Your last name is ' + (unknownNames?.[0] || 'unknown')"> Hello, {{ knownNames?.[0]?.[1] }}! You are a Balrog: {{ species?.[0]?.[1]?.[2]?.[3]?.[4]?.[5] || 'unknown' }} You are an Elf: {{ speciesMap?.[keys?.[0] ?? 'key'] }} You are an Orc: {{ speciesMap?.['key'] }} </span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <span [title]="'Your last name is ' + (unknownNames?.[0] || 'unknown')"> Hello, {{ knownNames?.[0]?.[1] }}! You are a Balrog: {{ species?.[0]?.[1]?.[2]?.[3]?.[4]?.[5] || 'unknown' }} You are an Elf: {{ speciesMap?.[keys?.[0] ?? 'key'] }} You are an Orc: {{ speciesMap?.['key'] }} </span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_keyed_read.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { unknownNames: string[] | null; knownNames: string[][]; species: null; keys: null; speciesMap: Record<string, string>; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: safe_access_deep.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.p = null; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` <span>Safe Property: {{ p?.a?.b?.c?.d }}</span> <span>Safe Keyed: {{ p?.['a']?.['b']?.['c']?.['d'] }}</span> <span>Mixed Property: {{ p?.a?.b.c.d?.e?.f?.g.h }}</span> <span>Mixed Property and Keyed: {{ p.a['b'].c.d?.['e']?.['f']?.g['h']['i']?.j.k }}</span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <span>Safe Property: {{ p?.a?.b?.c?.d }}</span> <span>Safe Keyed: {{ p?.['a']?.['b']?.['c']?.['d'] }}</span> <span>Mixed Property: {{ p?.a?.b.c.d?.e?.f?.g.h }}</span> <span>Mixed Property and Keyed: {{ p.a['b'].c.d?.['e']?.['f']?.g['h']['i']?.j.k }}</span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_access_deep.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { p: any; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: safe_access_temporaries.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.p = null; } f1() { } f2() { } f3() { } f4() { } f5() { } f6() { } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-
{ "end_byte": 6940, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js_6941_14001
LACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` <span>Safe Property with Calls: {{ p()?.a()?.b()?.c()?.d() }}</span> <span>Safe and Unsafe Property with Calls: {{ p?.a()?.b().c().d()?.e()?.f?.g.h?.i()?.j()?.k().l }}</span> <span>Nested Safe with Calls: {{ f1()?.[f2()?.a]?.b }}</span> <span>Deep Nested Safe with Calls: {{ f1()?.[f2()?.f3()?.[f4()?.f5()]]?.f6() }}</span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <span>Safe Property with Calls: {{ p()?.a()?.b()?.c()?.d() }}</span> <span>Safe and Unsafe Property with Calls: {{ p?.a()?.b().c().d()?.e()?.f?.g.h?.i()?.j()?.k().l }}</span> <span>Nested Safe with Calls: {{ f1()?.[f2()?.a]?.b }}</span> <span>Deep Nested Safe with Calls: {{ f1()?.[f2()?.f3()?.[f4()?.f5()]]?.f6() }}</span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_access_temporaries.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { p: any; f1(): any; f2(): any; f3(): any; f4(): any; f5(): any; f6(): any; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: safe_method_call.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` <span [title]="person?.getName(false)"></span> <span [title]="person?.getName(false) || ''"></span> <span [title]="person?.getName(false)?.toLowerCase()"></span> <span [title]="person?.getName(config.get('title')?.enabled)"></span> <span [title]="person?.getName(config.get('title')?.enabled ?? true)"></span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <span [title]="person?.getName(false)"></span> <span [title]="person?.getName(false) || ''"></span> <span [title]="person?.getName(false)?.toLowerCase()"></span> <span [title]="person?.getName(config.get('title')?.enabled)"></span> <span [title]="person?.getName(config.get('title')?.enabled ?? true)"></span> `, standalone: false }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_method_call.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { person?: { getName: (includeTitle: boolean | undefined) => string; }; config: { get: (name: string) => { enabled: boolean; } | undefined; }; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } /**************************************************************************************************** * PARTIAL FILE: safe_call.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.person = { getName: () => 'Bilbo' }; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` <span [title]="'Your last name is ' + (person.getLastName?.() ?? 'unknown')"> Hello, {{ person.getName?.() }}! You are a Balrog: {{ person.getSpecies?.()?.()?.()?.()?.() || 'unknown' }} </span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <span [title]="'Your last name is ' + (person.getLastName?.() ?? 'unknown')"> Hello, {{ person.getName?.() }}! You are a Balrog: {{ person.getSpecies?.()?.()?.()?.()?.() || 'unknown' }} </span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMe
{ "end_byte": 14001, "start_byte": 6941, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js_14002_18021
adata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_call.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { person: { getName: () => string; getLastName?: () => string; getSpecies?: () => () => () => () => () => string; }; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: safe_access_non_null.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.val = null; } foo(val) { return val; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "ng-component", ngImport: i0, template: ` {{ val?.foo!.bar }} {{ val?.[0].foo!.bar }} {{ foo(val)?.foo!.bar }} {{ $any(val)?.foo!.bar }} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{ val?.foo!.bar }} {{ val?.[0].foo!.bar }} {{ foo(val)?.foo!.bar }} {{ $any(val)?.foo!.bar }} `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: safe_access_non_null.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { val: any; foo(val: unknown): unknown; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 18021, "start_byte": 14002, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call_template.pipeline.js_0_831
template: function MyApp_Template(rf, $ctx$) { if (rf & 1) { $i0$.ɵɵelementStart(0, "span", 0); $i0$.ɵɵtext(1); $i0$.ɵɵelementEnd(); } if (rf & 2) { let $tmp_4_0$; let $tmp_5_0$; $i0$.ɵɵproperty("title", "Your last name is " + (($tmp_4_0$ = $ctx$.person.getLastName == null ? null : $ctx$.person.getLastName()) !== null && $tmp_4_0$ !== undefined ? $tmp_4_0$ : "unknown")); $i0$.ɵɵadvance(); $i0$.ɵɵtextInterpolate2(" Hello, ", $ctx$.person.getName == null ? null : $ctx$.person.getName(), "! You are a Balrog: ", ($ctx$.person.getSpecies == null ? null : ($tmp_5_0$ = $ctx$.person.getSpecies()) == null ? null : ($tmp_5_0$ = $tmp_5_0$()) == null ? null : ($tmp_5_0$ = $tmp_5_0$()) == null ? null : ($tmp_5_0$ = $tmp_5_0$()) == null ? null : $tmp_5_0$()) || "unknown", " "); } }
{ "end_byte": 831, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_call_template.pipeline.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_keyed_read_template.js_0_1015
template: function MyApp_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 0); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { let $tmp_0_0$; i0.ɵɵproperty("title", "Your last name is " + ((ctx.unknownNames == null ? null : ctx.unknownNames[0]) || "unknown")); i0.ɵɵadvance(); i0.ɵɵtextInterpolate4(" Hello, ", ctx.knownNames == null ? null : ctx.knownNames[0] == null ? null : ctx.knownNames[0][1], "! You are a Balrog: ", (ctx.species == null ? null : ctx.species[0] == null ? null : ctx.species[0][1] == null ? null : ctx.species[0][1][2] == null ? null : ctx.species[0][1][2][3] == null ? null : ctx.species[0][1][2][3][4] == null ? null : ctx.species[0][1][2][3][4][5]) || "unknown", " You are an Elf: ", ctx.speciesMap == null ? null : ctx.speciesMap[($tmp_0_0$ = ctx.keys == null ? null : ctx.keys[0]) !== null && $tmp_0_0$ !== undefined ? $tmp_0_0$ : "key"], " You are an Orc: ", ctx.speciesMap == null ? null : ctx.speciesMap["key"], " "); } }
{ "end_byte": 1015, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_keyed_read_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_method_call.ts_0_631
import {Component} from '@angular/core'; @Component({ template: ` <span [title]="person?.getName(false)"></span> <span [title]="person?.getName(false) || ''"></span> <span [title]="person?.getName(false)?.toLowerCase()"></span> <span [title]="person?.getName(config.get('title')?.enabled)"></span> <span [title]="person?.getName(config.get('title')?.enabled ?? true)"></span> `, standalone: false }) export class MyApp { person?: {getName: (includeTitle: boolean|undefined) => string;}; config: { get: (name: string) => { enabled: boolean } | undefined; } }
{ "end_byte": 631, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_method_call.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_keyed_read.ts_0_691
import {Component, NgModule} from '@angular/core'; @Component({ template: ` <span [title]="'Your last name is ' + (unknownNames?.[0] || 'unknown')"> Hello, {{ knownNames?.[0]?.[1] }}! You are a Balrog: {{ species?.[0]?.[1]?.[2]?.[3]?.[4]?.[5] || 'unknown' }} You are an Elf: {{ speciesMap?.[keys?.[0] ?? 'key'] }} You are an Orc: {{ speciesMap?.['key'] }} </span> `, standalone: false }) export class MyApp { unknownNames: string[]|null = null; knownNames: string[][] = [['Frodo', 'Bilbo']]; species = null; keys = null; speciesMap: Record<string, string> = {key: 'unknown'}; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 691, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_keyed_read.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_deep.ts_0_476
import {Component, NgModule} from '@angular/core'; @Component({ template: ` <span>Safe Property: {{ p?.a?.b?.c?.d }}</span> <span>Safe Keyed: {{ p?.['a']?.['b']?.['c']?.['d'] }}</span> <span>Mixed Property: {{ p?.a?.b.c.d?.e?.f?.g.h }}</span> <span>Mixed Property and Keyed: {{ p.a['b'].c.d?.['e']?.['f']?.g['h']['i']?.j.k }}</span> `, standalone: false }) export class MyApp { p: any = null; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 476, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/safe_access/safe_access_deep.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/test.js_0_316
function MyApp_Template(rf, ctx) { if (rf & 1) { $i0$.ɵɵtext(0); } if (rf & 2) { $i0$.ɵɵtextInterpolateV([ " ", ctx.list[0], " ", ctx.list[1], " ", ctx.list[2], " ", ctx.list[3], " ", ctx.list[4], " ", ctx.list[5], " ", ctx.list[6], " ", ctx.list[7], " ", ctx.list[8], " " ]); } }
{ "end_byte": 316, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/test.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js_0_2725
/**************************************************************************************************** * PARTIAL FILE: test.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.list = []; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: ' {{list[0]}} {{list[1]}} {{list[2]}} {{list[3]}} {{list[4]}} {{list[5]}} {{list[6]}} {{list[7]}} {{list[8]}} ', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: ' {{list[0]}} {{list[1]}} {{list[2]}} {{list[3]}} {{list[4]}} {{list[5]}} {{list[6]}} {{list[7]}} {{list[8]}} ', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: test.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { list: any[]; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 2725, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/test.ts_0_345
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: ' {{list[0]}} {{list[1]}} {{list[2]}} {{list[3]}} {{list[4]}} {{list[5]}} {{list[6]}} {{list[7]}} {{list[8]}} ', standalone: false }) export class MyApp { list: any[] = []; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 345, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/interpolations/test.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/this_any_access.ts_0_209
import {Component} from '@angular/core'; @Component({ template: '<div [tabIndex]="this.$any(null)"></div>', standalone: false }) class Comp { $any(value: null): any { return value as any; } }
{ "end_byte": 209, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/this_any_access.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/GOLDEN_PARTIAL.js_0_2674
/**************************************************************************************************** * PARTIAL FILE: basic_any_cast.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; class Comp { } Comp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Comp, deps: [], target: i0.ɵɵFactoryTarget.Component }); Comp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: Comp, isStandalone: false, selector: "ng-component", ngImport: i0, template: '<div [tabIndex]="$any(10)"></div>', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Comp, decorators: [{ type: Component, args: [{ template: '<div [tabIndex]="$any(10)"></div>', standalone: false }] }] }); /**************************************************************************************************** * PARTIAL FILE: basic_any_cast.d.ts ****************************************************************************************************/ export {}; /**************************************************************************************************** * PARTIAL FILE: this_any_access.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; class Comp { $any(value) { return value; } } Comp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Comp, deps: [], target: i0.ɵɵFactoryTarget.Component }); Comp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: Comp, isStandalone: false, selector: "ng-component", ngImport: i0, template: '<div [tabIndex]="this.$any(null)"></div>', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Comp, decorators: [{ type: Component, args: [{ template: '<div [tabIndex]="this.$any(null)"></div>', standalone: false }] }] }); /**************************************************************************************************** * PARTIAL FILE: this_any_access.d.ts ****************************************************************************************************/ export {};
{ "end_byte": 2674, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/basic_any_cast_template.js_0_33
i0.ɵɵproperty("tabIndex", 10);
{ "end_byte": 33, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/basic_any_cast_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/this_any_access_template.js_0_45
i0.ɵɵproperty("tabIndex", ctx.$any(null));
{ "end_byte": 45, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/this_any_access_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/basic_any_cast.ts_0_146
import {Component} from '@angular/core'; @Component({ template: '<div [tabIndex]="$any(10)"></div>', standalone: false }) class Comp { }
{ "end_byte": 146, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/any/basic_any_cast.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_host.ts_0_540
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', host: { '[attr.first-name]': `'Hello, ' + (firstName ?? 'Frodo') + '!'`, '(click)': `logLastName(lastName ?? lastNameFallback ?? 'unknown')` }, template: ``, standalone: false }) export class MyApp { firstName: string|null = null; lastName: string|null = null; lastNameFallback = 'Baggins'; logLastName(name: string) { console.log(name); } } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 540, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_host.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_interpolation.ts_0_450
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: ` <div>Hello, {{ firstName ?? 'Frodo' }}!</div> <span>Your last name is {{ lastName ?? lastNameFallback ?? 'unknown' }}</span> `, standalone: false }) export class MyApp { firstName: string|null = null; lastName: string|null = null; lastNameFallback = 'Baggins'; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 450, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_interpolation.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/GOLDEN_PARTIAL.js_0_7108
/**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_interpolation.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.firstName = null; this.lastName = null; this.lastNameFallback = 'Baggins'; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: ` <div>Hello, {{ firstName ?? 'Frodo' }}!</div> <span>Your last name is {{ lastName ?? lastNameFallback ?? 'unknown' }}</span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: ` <div>Hello, {{ firstName ?? 'Frodo' }}!</div> <span>Your last name is {{ lastName ?? lastNameFallback ?? 'unknown' }}</span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_interpolation.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { firstName: string | null; lastName: string | null; lastNameFallback: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_property.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.firstName = null; this.lastName = null; this.lastNameFallback = 'Baggins'; } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: ` <div [title]="'Hello, ' + (firstName ?? 'Frodo') + '!'"></div> <span [title]="'Your last name is ' + (lastName ?? lastNameFallback ?? 'unknown')"></span> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: ` <div [title]="'Hello, ' + (firstName ?? 'Frodo') + '!'"></div> <span [title]="'Your last name is ' + (lastName ?? lastNameFallback ?? 'unknown')"></span> `, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_property.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { firstName: string | null; lastName: string | null; lastNameFallback: string; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_host.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.firstName = null; this.lastName = null; this.lastNameFallback = 'Baggins'; } logLastName(name) { console.log(name); } } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", host: { listeners: { "click": "logLastName(lastName ?? lastNameFallback ?? 'unknown')" }, properties: { "attr.first-name": "'Hello, ' + (firstName ?? 'Frodo') + '!'" } }, ngImport: i0, template: ``, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", n
{ "end_byte": 7108, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/GOLDEN_PARTIAL.js_7109_9214
Import: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', host: { '[attr.first-name]': `'Hello, ' + (firstName ?? 'Frodo') + '!'`, '(click)': `logLastName(lastName ?? lastNameFallback ?? 'unknown')` }, template: ``, standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: nullish_coalescing_host.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { firstName: string | null; lastName: string | null; lastNameFallback: string; logLastName(name: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 9214, "start_byte": 7109, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_property_template.js_0_567
template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵelement(0, "div", 0)(1, "span", 0); } if (rf & 2) { let $tmp_0_0$; let $tmp_1_0$; $r3$.ɵɵproperty("title", "Hello, " + (($tmp_0_0$ = ctx.firstName) !== null && $tmp_0_0$ !== undefined ? $tmp_0_0$ : "Frodo") + "!"); $r3$.ɵɵadvance(); $r3$.ɵɵproperty("title", "Your last name is " + (($tmp_1_0$ = ($tmp_1_0$ = ctx.lastName) !== null && $tmp_1_0$ !== undefined ? $tmp_1_0$ : ctx.lastNameFallback) !== null && $tmp_1_0$ !== undefined ? $tmp_1_0$ : "unknown")); } }
{ "end_byte": 567, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_property_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_property.ts_0_479
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: ` <div [title]="'Hello, ' + (firstName ?? 'Frodo') + '!'"></div> <span [title]="'Your last name is ' + (lastName ?? lastNameFallback ?? 'unknown')"></span> `, standalone: false }) export class MyApp { firstName: string|null = null; lastName: string|null = null; lastNameFallback = 'Baggins'; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 479, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_property.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_host_bindings.js_0_540
hostBindings: function MyApp_HostBindings(rf, ctx) { if (rf & 1) { i0.ɵɵlistener("click", function MyApp_click_HostBindingHandler() { let $tmp_0$; return ctx.logLastName(($tmp_0$ = ($tmp_0$ = ctx.lastName) !== null && $tmp_0$ !== undefined ? $tmp_0$ : ctx.lastNameFallback) !== null && $tmp_0$ !== undefined ? $tmp_0$ : "unknown"); }); } if (rf & 2) { let $tmp_1$; i0.ɵɵattribute("first-name", "Hello, " + (($tmp_1$ = ctx.firstName) !== null && $tmp_1$ !== undefined ? $tmp_1$ : "Frodo") + "!"); } }
{ "end_byte": 540, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_host_bindings.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_interpolation_template.js_0_691
template: function MyApp_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "div"); i0.ɵɵtext(1); i0.ɵɵelementEnd(); i0.ɵɵelementStart(2, "span"); i0.ɵɵtext(3); i0.ɵɵelementEnd(); } if (rf & 2) { let $tmp_0_0$; let $tmp_1_0$; i0.ɵɵadvance(); i0.ɵɵtextInterpolate1("Hello, ", ($tmp_0_0$ = ctx.firstName) !== null && $tmp_0_0$ !== undefined ? $tmp_0_0$ : "Frodo", "!"); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1("Your last name is ", ($tmp_1_0$ = ($tmp_1_0$ = ctx.lastName) !== null && $tmp_1_0$ !== undefined ? $tmp_1_0$ : ctx.lastNameFallback) !== null && $tmp_1_0$ !== undefined ? $tmp_1_0$ : "unknown", ""); } }
{ "end_byte": 691, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/nullish_coalescing/nullish_coalescing_interpolation_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/duplicate_animation_listeners_template.js_0_155
template: function MyApp_Template(rf, ctx) { if (rf & 1) { $i0$.ɵɵelementStart(0, "div"); … $i0$.ɵɵproperty("@mySelector", …); } }
{ "end_byte": 155, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/duplicate_animation_listeners_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js_0_5218
/**************************************************************************************************** * PARTIAL FILE: static_animation_attribute.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: '<div @attr [@binding]="exp"></div>', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: '<div @attr [@binding]="exp"></div>', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: static_animation_attribute.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { exp: any; any: any; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: duplicate_animation_listeners.js ****************************************************************************************************/ import { Component, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { } MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: false, selector: "my-app", ngImport: i0, template: '<div (@mySelector.start)="false" (@mySelector.done)="false" [@mySelector]="0"></div>', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: '<div (@mySelector.start)="false" (@mySelector.done)="false" [@mySelector]="0"></div>', standalone: false }] }] }); export class MyModule { } MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyApp] }] }] }); /**************************************************************************************************** * PARTIAL FILE: duplicate_animation_listeners.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "my-app", never, {}, {}, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 5218, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/duplicate_animation_listeners.ts_0_301
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: '<div (@mySelector.start)="false" (@mySelector.done)="false" [@mySelector]="0"></div>', standalone: false }) export class MyApp { } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 301, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/duplicate_animation_listeners.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/static_animation_attribute_template.js_0_173
template: function MyApp_Template(rf, ctx) { if (rf & 1) { $i0$.ɵɵelement(0, "div"); } if (rf & 2) { $i0$.ɵɵproperty("@attr", …)("@binding", …); } }
{ "end_byte": 173, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/static_animation_attribute_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/static_animation_attribute.ts_0_273
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-app', template: '<div @attr [@binding]="exp"></div>', standalone: false }) export class MyApp { exp!: any; any!: any; } @NgModule({declarations: [MyApp]}) export class MyModule { }
{ "end_byte": 273, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler/animations/static_animation_attribute.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/complex_transform_functions.ts_0_740
import {Directive, input} from '@angular/core'; // Note: `@Input` non-signal inputs did not support arrow functions as an example. const toBoolean = (v: string|boolean) => v === true || v !== ''; // Note: `@Input` non-signal inputs did not support transform function "builders" and generics. const complexTransform = <T>(defaultVal: T) => (v: string) => v || defaultVal; @Directive({ }) export class TestDir { name = input.required<boolean, string|boolean>({ transform: (v) => v === true || v !== '', }); name2 = input.required<boolean, string|boolean>({transform: toBoolean}); genericTransform = input.required({transform: complexTransform(1)}); genericTransform2 = input.required({transform: complexTransform(null)}); }
{ "end_byte": 740, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/complex_transform_functions.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/mixed_input_types.js_0_510
TestDir.ɵdir = /* @__PURE__ */ $r3$.ɵɵdefineDirective({ … inputs: { counter: [1, "counter"], signalWithTransform: [1, "signalWithTransform"], signalWithTransformAndAlias: [1, "publicNameSignal", "signalWithTransformAndAlias"], decoratorInput: "decoratorInput", decoratorInputWithAlias: [0, "publicNameDecorator", "decoratorInputWithAlias"], decoratorInputWithTransformAndAlias: [2, "publicNameDecorator2", "decoratorInputWithTransformAndAlias", convertToBoolean] }, … });
{ "end_byte": 510, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/mixed_input_types.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_directive_definition.js_0_160
TestDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … inputs: { counter: [1, "counter"], name: [1, "name"] } … });
{ "end_byte": 160, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_directive_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/transform_not_captured.ts_0_275
import {Directive, input} from '@angular/core'; function convertToBoolean(value: string|boolean) { return value === true || value !== ''; } @Directive({ }) export class TestDir { name = input.required<boolean, string|boolean>({ transform: convertToBoolean, }); }
{ "end_byte": 275, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/transform_not_captured.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/GOLDEN_PARTIAL.js_0_8715
/**************************************************************************************************** * PARTIAL FILE: input_directive_definition.js ****************************************************************************************************/ import { Directive, input } from '@angular/core'; import * as i0 from "@angular/core"; export class TestDir { constructor() { this.counter = input(0); this.name = input.required(); } } TestDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); TestDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, inputs: { counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }] }); /**************************************************************************************************** * PARTIAL FILE: input_directive_definition.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { counter: import("@angular/core").InputSignal<number>; name: import("@angular/core").InputSignal<string>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: input_component_definition.js ****************************************************************************************************/ import { Component, input } from '@angular/core'; import * as i0 from "@angular/core"; export class TestComp { constructor() { this.counter = input(0); this.name = input.required(); } } TestComp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestComp, deps: [], target: i0.ɵɵFactoryTarget.Component }); TestComp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "0.0.0-PLACEHOLDER", type: TestComp, isStandalone: true, selector: "ng-component", inputs: { counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: 'Works', isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestComp, decorators: [{ type: Component, args: [{ template: 'Works', }] }] }); /**************************************************************************************************** * PARTIAL FILE: input_component_definition.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestComp { counter: import("@angular/core").InputSignal<number>; name: import("@angular/core").InputSignal<string>; static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: mixed_input_types.js ****************************************************************************************************/ import { Directive, Input, input } from '@angular/core'; import * as i0 from "@angular/core"; function convertToBoolean(value) { return value === true || value !== ''; } export class TestDir { constructor() { this.counter = input(0); this.signalWithTransform = input(false, { transform: convertToBoolean }); this.signalWithTransformAndAlias = input(false, { alias: 'publicNameSignal', transform: convertToBoolean }); this.decoratorInput = true; this.decoratorInputWithAlias = true; this.decoratorInputWithTransformAndAlias = true; } } TestDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); TestDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, inputs: { counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null }, signalWithTransform: { classPropertyName: "signalWithTransform", publicName: "signalWithTransform", isSignal: true, isRequired: false, transformFunction: null }, signalWithTransformAndAlias: { classPropertyName: "signalWithTransformAndAlias", publicName: "publicNameSignal", isSignal: true, isRequired: false, transformFunction: null }, decoratorInput: { classPropertyName: "decoratorInput", publicName: "decoratorInput", isSignal: false, isRequired: false, transformFunction: null }, decoratorInputWithAlias: { classPropertyName: "decoratorInputWithAlias", publicName: "publicNameDecorator", isSignal: false, isRequired: false, transformFunction: null }, decoratorInputWithTransformAndAlias: { classPropertyName: "decoratorInputWithTransformAndAlias", publicName: "publicNameDecorator2", isSignal: false, isRequired: false, transformFunction: convertToBoolean } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }], propDecorators: { decoratorInput: [{ type: Input }], decoratorInputWithAlias: [{ type: Input, args: ['publicNameDecorator'] }], decoratorInputWithTransformAndAlias: [{ type: Input, args: [{ alias: 'publicNameDecorator2', transform: convertToBoolean }] }] } }); /**************************************************************************************************** * PARTIAL FILE: mixed_input_types.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { counter: import("@angular/core").InputSignal<number>; signalWithTransform: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>; signalWithTransformAndAlias: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>; decoratorInput: boolean; decoratorInputWithAlias: boolean; decoratorInputWithTransformAndAlias: boolean; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "counter": { "alias": "counter"; "required": false; "isSignal": true; }; "signalWithTransform": { "alias": "signalWithTransform"; "required": false; "isSignal": true; }; "signalWithTransformAndAlias": { "alias": "publicNameSignal"; "required": false; "isSignal": true; }; "decoratorInput": { "alias": "decoratorInput"; "required": false; }; "decoratorInputWithAlias": { "alias": "publicNameDecorator"; "required": false; }; "decoratorInputWithTransformAndAlias": { "alias": "publicNameDecorator2"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_decoratorInputWithTransformAndAlias: string | boolean; } /**************************************************************************************************** * PARTIAL FILE: transform_not_captured.js ****************************************************************************************************/ import { Directive, input } from '@angular/core'; import * as i0 from "@angular/core"; function convertToBoolean(value) { return value === true || value !== ''; } export class TestDir { constructor() {
{ "end_byte": 8715, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/GOLDEN_PARTIAL.js_8716_13417
this.name = input.required({ transform: convertToBoolean, }); } } TestDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); TestDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }] }); /**************************************************************************************************** * PARTIAL FILE: transform_not_captured.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { name: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: complex_transform_functions.js ****************************************************************************************************/ import { Directive, input } from '@angular/core'; import * as i0 from "@angular/core"; // Note: `@Input` non-signal inputs did not support arrow functions as an example. const toBoolean = (v) => v === true || v !== ''; // Note: `@Input` non-signal inputs did not support transform function "builders" and generics. const complexTransform = (defaultVal) => (v) => v || defaultVal; export class TestDir { constructor() { this.name = input.required({ transform: (v) => v === true || v !== '', }); this.name2 = input.required({ transform: toBoolean }); this.genericTransform = input.required({ transform: complexTransform(1) }); this.genericTransform2 = input.required({ transform: complexTransform(null) }); } } TestDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, deps: [], target: i0.ɵɵFactoryTarget.Directive }); TestDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, name2: { classPropertyName: "name2", publicName: "name2", isSignal: true, isRequired: true, transformFunction: null }, genericTransform: { classPropertyName: "genericTransform", publicName: "genericTransform", isSignal: true, isRequired: true, transformFunction: null }, genericTransform2: { classPropertyName: "genericTransform2", publicName: "genericTransform2", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }] }); /**************************************************************************************************** * PARTIAL FILE: complex_transform_functions.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { name: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>; name2: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>; genericTransform: import("@angular/core").InputSignalWithTransform<string | number, string>; genericTransform2: import("@angular/core").InputSignalWithTransform<string | null, string>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "name2": { "alias": "name2"; "required": true; "isSignal": true; }; "genericTransform": { "alias": "genericTransform"; "required": true; "isSignal": true; }; "genericTransform2": { "alias": "genericTransform2"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>; }
{ "end_byte": 13417, "start_byte": 8716, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_component_definition.js_0_162
TestComp.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ … inputs: { counter: [1, "counter"], name: [1, "name"] }, … });
{ "end_byte": 162, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_component_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/mixed_input_types.ts_0_609
import {Directive, Input, input} from '@angular/core'; function convertToBoolean(value: string|boolean) { return value === true || value !== ''; } @Directive({ }) export class TestDir { counter = input(0); signalWithTransform = input(false, {transform: convertToBoolean}); signalWithTransformAndAlias = input(false, {alias: 'publicNameSignal', transform: convertToBoolean}); @Input() decoratorInput = true; @Input('publicNameDecorator') decoratorInputWithAlias = true; @Input({alias: 'publicNameDecorator2', transform: convertToBoolean}) decoratorInputWithTransformAndAlias = true; }
{ "end_byte": 609, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/mixed_input_types.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/complex_transform_functions.js_0_260
TestDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … inputs: { name: [1, "name"], name2: [1, "name2"], genericTransform: [1, "genericTransform"], genericTransform2: [1, "genericTransform2"] } … });
{ "end_byte": 260, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/complex_transform_functions.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_component_definition.ts_0_169
import {Component, input} from '@angular/core'; @Component({ template: 'Works', }) export class TestComp { counter = input(0); name = input.required<string>(); }
{ "end_byte": 169, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_component_definition.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_directive_definition.ts_0_147
import {Directive, input} from '@angular/core'; @Directive({ }) export class TestDir { counter = input(0); name = input.required<string>(); }
{ "end_byte": 147, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_directive_definition.ts" }