_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs/transform_not_captured.js_0_127
TestDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … inputs: { name: [1, "name"] } … });
{ "end_byte": 127, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_inputs/transform_not_captured.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_refs_template.js_0_553
$r3$.ɵɵdefineComponent({ … decls: 6, vars: 1, … template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵelement(0, "input", null, 0)(2, "input", null, 1); $r3$.ɵɵdeclareLet(4); $r3$.ɵɵtext(5); } if (rf & 2) { const $name_r1$ = $r3$.ɵɵreference(1); const $lastName_r2$ = $r3$.ɵɵreference(3); const $fullName_2$ = $name_r1$.value + " " + $lastName_r2$.value; $r3$.ɵɵadvance(5); $r3$.ɵɵtextInterpolate1(" Hello, ", $fullName_2$, " "); } }, … });
{ "end_byte": 553, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_refs_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_shared_with_child_view.ts_0_176
import {Component} from '@angular/core'; @Component({ template: ` @let value = 123; {{value}} <ng-template>{{value}}</ng-template> `, }) export class MyApp {}
{ "end_byte": 176, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_shared_with_child_view.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_listener_template.js_0_937
$r3$.ɵɵdefineComponent({ … decls: 7, vars: 3, … template: function MyApp_Template(rf, ctx) { if (rf & 1) { const $_r1$ = $r3$.ɵɵgetCurrentView(); $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1)(2)(3)(4); $r3$.ɵɵtext(5); $r3$.ɵɵelementStart(6, "button", 0); $r3$.ɵɵlistener("click", function MyApp_Template_button_click_6_listener() { $r3$.ɵɵrestoreView($_r1$); const $three_1$ = $r3$.ɵɵreadContextLet(3); return $r3$.ɵɵresetView(ctx.callback($three_1$)); }); $r3$.ɵɵelementEnd(); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); const $one_2$ = ctx.value + 1; const $two_3$ = $one_2$ + 1; $r3$.ɵɵadvance(3); const $three_5$ = $r3$.ɵɵstoreLet($two_3$ + 1); $three_5$ + 1; $r3$.ɵɵadvance(2); $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); } }, … });
{ "end_byte": 937, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_listener_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_for_loop_template.js_0_1138
function MyApp_For_1_For_2_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); } if (rf & 2) { const ɵ$index_3_r1 = ctx.$index; $r3$.ɵɵnextContext(); const $outerFirst_1$ = $r3$.ɵɵreadContextLet(0); const $innerFirst_2$ = ɵ$index_3_r1 === 0; $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" ", $outerFirst_1$ || $innerFirst_2$, " "); } } … function MyApp_For_1_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵrepeaterCreate(1, MyApp_For_1_For_2_Template, 2, 1, null, null, $r3$.ɵɵrepeaterTrackByIdentity); } if (rf & 2) { const $item_r4$ = ctx.$implicit; const ɵ$index_1_r5 = ctx.$index; $r3$.ɵɵstoreLet(ɵ$index_1_r5 === 0); $r3$.ɵɵadvance(); $r3$.ɵɵrepeater($item_r4$.children); } } … $r3$.ɵɵdefineComponent({ … decls: 2, vars: 0, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵrepeaterCreate(0, MyApp_For_1_Template, 3, 1, null, null, $r3$.ɵɵrepeaterTrackByIdentity); } if (rf & 2) { $r3$.ɵɵrepeater(ctx.items); } }, … });
{ "end_byte": 1138, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_for_loop_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_forward_refs.ts_0_176
import {Component} from '@angular/core'; @Component({ template: ` @let message = 'Hello, ' + name.value; {{message}} <input #name> `, }) export class MyApp {}
{ "end_byte": 176, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_forward_refs.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_partial_optimization.ts_0_242
import {Component} from '@angular/core'; @Component({ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{two}} `, }) export class MyApp { value = 0; }
{ "end_byte": 242, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_partial_optimization.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_child_view.ts_0_283
import {Component} from '@angular/core'; @Component({ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} @if (true) { {{three}} } `, }) export class MyApp { value = 0; }
{ "end_byte": 283, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_child_view.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_listener_template.js_0_751
$r3$.ɵɵdefineComponent({ … decls: 3, vars: 2, … template: function MyApp_Template(rf, ctx) { if (rf & 1) { const $_r1$ = $r3$.ɵɵgetCurrentView(); $r3$.ɵɵdeclareLet(0)(1); $r3$.ɵɵelementStart(2, "button", 0); $r3$.ɵɵlistener("click", function MyApp_Template_button_click_2_listener() { $r3$.ɵɵrestoreView($_r1$); const $one_1$ = $r3$.ɵɵreadContextLet(0); const $two_2$ = $r3$.ɵɵreadContextLet(1); return $r3$.ɵɵresetView(ctx.callback($one_1$, $two_2$)); }); $r3$.ɵɵelementEnd(); } if (rf & 2) { const $one_r1$ = $r3$.ɵɵstoreLet(ctx.value + 1); $r3$.ɵɵadvance(); $r3$.ɵɵstoreLet($one_r1$ + 1); } }, … });
{ "end_byte": 751, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_listener_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_with_pipe_template.js_0_450
$r3$.ɵɵdefineComponent({ … decls: 4, vars: 3, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0)(1); $r3$.ɵɵpipe(2, "double"); $r3$.ɵɵtext(3); } if (rf & 2) { const $one_0$ = ctx.value + 1; const $result_1$ = $r3$.ɵɵpipeBind1(2, 1, $one_0$); $r3$.ɵɵadvance(3); $r3$.ɵɵtextInterpolate1(" The result is ", $result_1$, " "); } }, … });
{ "end_byte": 450, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_with_pipe_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_for_loop.ts_0_348
import {Component} from '@angular/core'; @Component({ template: ` @for (item of items; track item) { @let outerFirst = $first; @for (subitem of item.children; track subitem) { @let innerFirst = $first; {{outerFirst || innerFirst}} } } `, }) export class MyApp { items: {children: any[]}[] = []; }
{ "end_byte": 348, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_for_loop.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_multiple_optimization.ts_0_244
import {Component} from '@angular/core'; @Component({ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} `, }) export class MyApp { value = 0; }
{ "end_byte": 244, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_multiple_optimization.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_partial_optimization_template.js_0_516
$r3$.ɵɵdefineComponent({ … decls: 6, vars: 2, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1)(2)(3)(4); $r3$.ɵɵtext(5); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); const $one_0$ = ctx.value + 1; const $two_1$ = $one_0$ + 1; const $three_2$ = $two_1$ + 1; $three_2$ + 1; $r3$.ɵɵadvance(5); $r3$.ɵɵtextInterpolate1(" ", $two_1$, " "); } }, … });
{ "end_byte": 516, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_partial_optimization_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/multiple_let.ts_0_219
import {Component} from '@angular/core'; @Component({ template: ` @let one = value + 1; @let two = one + 1; @let result = two + 1; The result is {{result}} `, }) export class MyApp { value = 1; }
{ "end_byte": 219, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/multiple_let.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_invalid_forward_ref.ts_0_198
import {Component} from '@angular/core'; @Component({ template: ` <ng-template> {{result}} @let result = value * 2; </ng-template> `, }) export class MyApp { value = 1; }
{ "end_byte": 198, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_invalid_forward_ref.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_with_pipe.ts_0_384
import {Component, Pipe, PipeTransform} from '@angular/core'; @Pipe({ name: 'double', }) export class DoublePipe implements PipeTransform { transform(value: number) { return value * 2; } } @Component({ template: ` @let one = value + 1; @let result = one | double; The result is {{result}} `, imports: [DoublePipe], }) export class MyApp { value = 1; }
{ "end_byte": 384, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_with_pipe.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/multiple_let_template.js_0_432
$r3$.ɵɵdefineComponent({ … decls: 4, vars: 1, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0)(1)(2); $r3$.ɵɵtext(3); } if (rf & 2) { const $one_0$ = ctx.value + 1; const $two_1$ = $one_0$ + 1; const $result_2$ = $two_1$ + 1; $r3$.ɵɵadvance(3); $r3$.ɵɵtextInterpolate1(" The result is ", $result_2$, " "); } }, … });
{ "end_byte": 432, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/multiple_let_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_single_optimization.ts_0_170
import {Component} from '@angular/core'; @Component({ template: ` {{value}} @let result = value * 2; {{value}} `, }) export class MyApp { value = 0; }
{ "end_byte": 170, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_single_optimization.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_invalid_forward_ref_template.js_0_402
function MyApp_ng_template_0_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1); } if (rf & 2) { const $ctx_r0$ = $r3$.ɵɵnextContext(); $r3$.ɵɵtextInterpolate1(" ", undefined, " "); $ctx_r0$.value * 2; } } … function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtemplate(0, MyApp_ng_template_0_Template, 2, 1, "ng-template"); } }
{ "end_byte": 402, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_invalid_forward_ref_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_shared_with_child_view_template.js_0_667
function MyApp_ng_template_2_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); } if (rf & 2) { $r3$.ɵɵnextContext(); const $value_0$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵtextInterpolate($value_0$); } } … $r3$.ɵɵdefineComponent({ … decls: 3, vars: 2, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); $r3$.ɵɵtemplate(2, MyApp_ng_template_2_Template, 1, 1, "ng-template"); } if (rf & 2) { const $value_r0$ = $r3$.ɵɵstoreLet(123); $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" ", $value_r0$, " "); } }, … });
{ "end_byte": 667, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_shared_with_child_view_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_listener.ts_0_548
import {Component} from '@angular/core'; @Component({ template: ` @let one = value + 1; <ng-template> @let two = one + 1; @if (true) { @let three = two + 1; @switch (1) { @case (1) { @let four = three + 1; <button (click)="callback(one, two, three, four)"></button> } } } </ng-template> `, }) export class MyApp { value = 1; callback(one: number, two: number, three: number, four: number) { console.log(one, two, three, four); } }
{ "end_byte": 548, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_listener.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js_0_8225
/**************************************************************************************************** * PARTIAL FILE: simple_let.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 1; } } 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: ` @let result = value * 2; The result is {{result}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let result = value * 2; The result is {{result}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: simple_let.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: multiple_let.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 1; } } 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: ` @let one = value + 1; @let two = one + 1; @let result = two + 1; The result is {{result}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let one = value + 1; @let two = one + 1; @let result = two + 1; The result is {{result}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: multiple_let.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_with_pipe.js ****************************************************************************************************/ import { Component, Pipe } from '@angular/core'; import * as i0 from "@angular/core"; export class DoublePipe { transform(value) { return value * 2; } } DoublePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: DoublePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); DoublePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: DoublePipe, isStandalone: true, name: "double" }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: DoublePipe, decorators: [{ type: Pipe, args: [{ name: 'double', }] }] }); export class MyApp { constructor() { this.value = 1; } } 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: ` @let one = value + 1; @let result = one | double; The result is {{result}} `, isInline: true, dependencies: [{ kind: "pipe", type: DoublePipe, name: "double" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let one = value + 1; @let result = one | double; The result is {{result}} `, imports: [DoublePipe], }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_with_pipe.d.ts ****************************************************************************************************/ import { PipeTransform } from '@angular/core'; import * as i0 from "@angular/core"; export declare class DoublePipe implements PipeTransform { transform(value: number): number; static ɵfac: i0.ɵɵFactoryDeclaration<DoublePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<DoublePipe, "double", true>; } export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_in_listener.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 1; } callback(one, two) { console.log(one, two); } } 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: ` @let one = value + 1; @let two = one + 1; <button (click)="callback(one, two)"></button> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let one = value + 1; @let two = one + 1; <button (click)="callback(one, two)"></button> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_in_listener.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; callback(one: number, two: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_in_child_view.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { } MyApp.ɵfac = i0.ɵɵn
{ "end_byte": 8225, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js_8226_16144
DeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component }); MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` @if (true) { @if (true) { @let three = two + 1; {{three}} } @let two = one + 1; } @let one = 1; `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @if (true) { @if (true) { @let three = two + 1; {{three}} } @let two = one + 1; } @let one = 1; `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_in_child_view.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_shared_with_child_view.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: true, selector: "ng-component", ngImport: i0, template: ` @let value = 123; {{value}} <ng-template>{{value}}</ng-template> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let value = 123; {{value}} <ng-template>{{value}}</ng-template> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_shared_with_child_view.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_in_child_view_listener.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 1; } callback(one, two, three, four) { console.log(one, two, three, four); } } 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: "17.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` @let one = value + 1; <ng-template> @let two = one + 1; @if (true) { @let three = two + 1; @switch (1) { @case (1) { @let four = three + 1; <button (click)="callback(one, two, three, four)"></button> } } } </ng-template> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let one = value + 1; <ng-template> @let two = one + 1; @if (true) { @let three = two + 1; @switch (1) { @case (1) { @let four = three + 1; <button (click)="callback(one, two, three, four)"></button> } } } </ng-template> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_in_child_view_listener.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; callback(one: number, two: number, three: number, four: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_local_refs.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: true, selector: "ng-component", ngImport: i0, template: ` <input #name> <input #lastName> @let fullName = name.value + ' ' + lastName.value; Hello, {{fullName}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <input #name> <input #lastName> @let fullName = name.value + ' ' + lastName.value; Hello, {{fullName}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_local_refs.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_local_forward_refs.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: true, selector: "ng-component", ngImport: i0, template: ` @let message = 'Hello, ' + name.value; {{message}} <input #name> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component
{ "end_byte": 16144, "start_byte": 8226, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js_16145_24485
args: [{ template: ` @let message = 'Hello, ' + name.value; {{message}} <input #name> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_local_forward_refs.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_for_loop.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.items = []; } } 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: "17.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` @for (item of items; track item) { @let outerFirst = $first; @for (subitem of item.children; track subitem) { @let innerFirst = $first; {{outerFirst || innerFirst}} } } `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @for (item of items; track item) { @let outerFirst = $first; @for (subitem of item.children; track subitem) { @let innerFirst = $first; {{outerFirst || innerFirst}} } } `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_for_loop.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { items: { children: any[]; }[]; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_invalid_forward_ref.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 1; } } 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: ` <ng-template> {{result}} @let result = value * 2; </ng-template> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` <ng-template> {{result}} @let result = value * 2; </ng-template> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_invalid_forward_ref.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_single_optimization.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 0; } } 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: ` {{value}} @let result = value * 2; {{value}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{value}} @let result = value * 2; {{value}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_single_optimization.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_multiple_optimization.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 0; } } 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: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_multiple_optimization.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_partial_optimization.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 0; } } 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
{ "end_byte": 24485, "start_byte": 16145, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js_24486_31423
0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{two}} `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{two}} `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_partial_optimization.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_optimization_listener.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 0; } callback(value) { console.log(value); } } 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: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} <button (click)="callback(three)"></button> `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} <button (click)="callback(three)"></button> `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_optimization_listener.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; callback(value: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: let_optimization_child_view.js ****************************************************************************************************/ import { Component } from '@angular/core'; import * as i0 from "@angular/core"; export class MyApp { constructor() { this.value = 0; } } 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: "17.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} @if (true) { {{three}} } `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} @if (true) { {{three}} } `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: let_optimization_child_view.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { value: number; static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: shadowed_let.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: "17.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` @let value = 'parent'; @if (true) { @let value = 'local'; The value comes from {{value}} } `, isInline: true }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ template: ` @let value = 'parent'; @if (true) { @let value = 'local'; The value comes from {{value}} } `, }] }] }); /**************************************************************************************************** * PARTIAL FILE: shadowed_let.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyApp { static ɵfac: i0.ɵɵFactoryDeclaration<MyApp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyApp, "ng-component", never, {}, {}, never, never, true, never>; }
{ "end_byte": 31423, "start_byte": 24486, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view.ts_0_242
import {Component} from '@angular/core'; @Component({ template: ` @if (true) { @if (true) { @let three = two + 1; {{three}} } @let two = one + 1; } @let one = 1; `, }) export class MyApp {}
{ "end_byte": 242, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_multiple_optimization_template.js_0_518
$r3$.ɵɵdefineComponent({ … decls: 6, vars: 2, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1)(2)(3)(4); $r3$.ɵɵtext(5); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); const $one_1$ = ctx.value + 1; const $two_2$ = $one_1$ + 1; const $three_3$ = $two_2$ + 1; $three_3$ + 1; $r3$.ɵɵadvance(5); $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); } }, … });
{ "end_byte": 518, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_multiple_optimization_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_listener_template.js_0_2121
function MyApp_ng_template_1_Conditional_1_Case_1_Template(rf, ctx) { if (rf & 1) { const $_r1$ = $r3$.ɵɵgetCurrentView(); $r3$.ɵɵdeclareLet(0); $r3$.ɵɵelementStart(1, "button", 0); $r3$.ɵɵlistener( "click", function MyApp_ng_template_1_Conditional_1_Case_1_Template_button_click_1_listener() { $r3$.ɵɵrestoreView($_r1$); const $four_1$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵnextContext(); const $three_2$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵnextContext(); const $two_3$ = $r3$.ɵɵreadContextLet(0); const $ctx_r4$ = $r3$.ɵɵnextContext(); const $one_5$ = $r3$.ɵɵreadContextLet(0); return $r3$.ɵɵresetView($ctx_r4$.callback($one_5$, $two_3$, $three_2$, $four_1$)); } ); $r3$.ɵɵelementEnd(); } if (rf & 2) { $r3$.ɵɵnextContext(); const $three_2$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵstoreLet($three_2$ + 1); } } … function MyApp_ng_template_1_Conditional_1_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtemplate(1, MyApp_ng_template_1_Conditional_1_Case_1_Template, 2, 1, "button"); } if (rf & 2) { let $tmp_5_0$; $r3$.ɵɵnextContext(); const $two_3$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵstoreLet($two_3$ + 1); $r3$.ɵɵadvance(); $r3$.ɵɵconditional(($tmp_5_0$ = 1) === 1 ? 1 : -1); } } … function MyApp_ng_template_1_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtemplate(1, MyApp_ng_template_1_Conditional_1_Template, 2, 2); } if (rf & 2) { $r3$.ɵɵnextContext(); const $one_5$ = $r3$.ɵɵreadContextLet(0); $r3$.ɵɵstoreLet($one_5$ + 1); $r3$.ɵɵadvance(); $r3$.ɵɵconditional(true ? 1 : -1); } } … $r3$.ɵɵdefineComponent({ … decls: 2, vars: 1, … template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtemplate(1, MyApp_ng_template_1_Template, 2, 2, "ng-template"); } if (rf & 2) { $r3$.ɵɵstoreLet(ctx.value + 1); } }, … });
{ "end_byte": 2121, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_listener_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/simple_let_template.js_0_355
$r3$.ɵɵdefineComponent({ … decls: 2, vars: 1, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); } if (rf & 2) { const $result_0$ = ctx.value * 2; $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" The result is ", $result_0$, " "); } }, … });
{ "end_byte": 355, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/simple_let_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_listener.ts_0_286
import {Component} from '@angular/core'; @Component({ template: ` @let one = value + 1; @let two = one + 1; <button (click)="callback(one, two)"></button> `, }) export class MyApp { value = 1; callback(one: number, two: number) { console.log(one, two); } }
{ "end_byte": 286, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_listener.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/simple_let.ts_0_171
import {Component} from '@angular/core'; @Component({ template: ` @let result = value * 2; The result is {{result}} `, }) export class MyApp { value = 1; }
{ "end_byte": 171, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/simple_let.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_forward_refs_template.js_0_455
$r3$.ɵɵdefineComponent({ … decls: 4, vars: 1, … template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); $r3$.ɵɵelement(2, "input", null, 0); } if (rf & 2) { const $name_r1$ = $r3$.ɵɵreference(3); const $message_1$ = "Hello, " + $name_r1$.value; $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" ", $message_1$, " "); } }, … });
{ "end_byte": 455, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_forward_refs_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/shadowed_let.ts_0_215
import {Component} from '@angular/core'; @Component({ template: ` @let value = 'parent'; @if (true) { @let value = 'local'; The value comes from {{value}} } `, }) export class MyApp {}
{ "end_byte": 215, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/shadowed_let.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_child_view_template.js_0_944
function MyApp_Conditional_6_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); } if (rf & 2) { $r3$.ɵɵnextContext(); const $three_0$ = $r3$.ɵɵreadContextLet(3); $r3$.ɵɵtextInterpolate1(" ", $three_0$, " "); } } … $r3$.ɵɵdefineComponent({ … decls: 7, vars: 4, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1)(2)(3)(4); $r3$.ɵɵtext(5); $r3$.ɵɵtemplate(6, MyApp_Conditional_6_Template, 1, 1); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); const $one_1$ = ctx.value + 1; const $two_2$ = $one_1$ + 1; $r3$.ɵɵadvance(3); const $three_3$ = i0.ɵɵstoreLet($two_2$ + 1); $three_3$ + 1; $r3$.ɵɵadvance(2); $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); $r3$.ɵɵadvance(); $r3$.ɵɵconditional(true ? 6 : -1); } }, … });
{ "end_byte": 944, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_child_view_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_template.js_0_1083
function MyApp_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); } if (rf & 2) { $r3$.ɵɵnextContext(); const $two_0$ = $r3$.ɵɵreadContextLet(1); const $three_1$ = $two_0$ + 1; $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" ", $three_1$, " "); } } … function MyApp_Conditional_0_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtemplate(0, MyApp_Conditional_0_Conditional_0_Template, 2, 1); $r3$.ɵɵdeclareLet(1); } if (rf & 2) { $r3$.ɵɵnextContext(); const $one_2$ = $r3$.ɵɵreadContextLet(1); $r3$.ɵɵconditional(true ? 0 : -1); $r3$.ɵɵadvance(); $r3$.ɵɵstoreLet($one_2$ + 1); } } … $r3$.ɵɵdefineComponent({ … decls: 2, vars: 2, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtemplate(0, MyApp_Conditional_0_Template, 2, 2); $r3$.ɵɵdeclareLet(1); } if (rf & 2) { $r3$.ɵɵconditional(true ? 0 : -1); $r3$.ɵɵadvance(); $r3$.ɵɵstoreLet(1); } }, … });
{ "end_byte": 1083, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_in_child_view_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/shadowed_let_template.js_0_622
function MyApp_Conditional_1_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtext(1); } if (rf & 2) { const $value_r1$ = "local"; $r3$.ɵɵadvance(); $r3$.ɵɵtextInterpolate1(" The value comes from ", $value_r1$, " "); } } … $r3$.ɵɵdefineComponent({ … decls: 2, vars: 1, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵdeclareLet(0); $r3$.ɵɵtemplate(1, MyApp_Conditional_1_Template, 2, 1); } if (rf & 2) { "parent"; $r3$.ɵɵadvance(); $r3$.ɵɵconditional(true ? 1 : -1); } }, … });
{ "end_byte": 622, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/shadowed_let_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_refs.ts_0_219
import {Component} from '@angular/core'; @Component({ template: ` <input #name> <input #lastName> @let fullName = name.value + ' ' + lastName.value; Hello, {{fullName}} `, }) export class MyApp {}
{ "end_byte": 219, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_local_refs.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_listener.ts_0_349
import {Component} from '@angular/core'; @Component({ template: ` {{value}} @let one = value + 1; @let two = one + 1; @let three = two + 1; @let four = three + 1; {{value}} <button (click)="callback(three)"></button> `, }) export class MyApp { value = 0; callback(value: number) { console.log(value); } }
{ "end_byte": 349, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_optimization_listener.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_single_optimization_template.js_0_400
$r3$.ɵɵdefineComponent({ … decls: 3, vars: 2, template: function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵdeclareLet(1); $r3$.ɵɵtext(2); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); ctx.value * 2; $r3$.ɵɵadvance(2); $r3$.ɵɵtextInterpolate1(" ", ctx.value, " "); } }, … });
{ "end_byte": 400, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_let/let_single_optimization_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory_fac.js_0_146
MyService.ɵfac = function MyService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyService)($r3$.ɵɵinject(MyDependency)); }
{ "end_byte": 146, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory_fac.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory_prov.js_0_112
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: MyService.ɵfac });
{ "end_byte": 112, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory_prov.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable_pipe_last.js_0_419
// NOTE The prov definition must be last so MyPipe.fac is defined MyPipe.ɵfac = function MyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyPipe)(i0.ɵɵdirectiveInject(Service, 16)); }; MyPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "myPipe", type: MyPipe, pure: true, standalone: false }); MyPipe.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MyPipe, factory: MyPipe.ɵfac });
{ "end_byte": 419, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable_pipe_last.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable.ts_0_792
import {Component, Injectable, NgModule, Pipe, PipeTransform} from '@angular/core'; @Injectable() class Service { } @Injectable() @Pipe({ name: 'myPipe', standalone: false }) export class MyPipe implements PipeTransform { constructor(service: Service) {} transform(value: any, ...args: any[]) { return value; } } @Pipe({ name: 'myOtherPipe', standalone: false }) @Injectable() export class MyOtherPipe implements PipeTransform { constructor(service: Service) {} transform(value: any, ...args: any[]) { return value; } } @Component({ selector: 'my-app', template: '{{0 | myPipe | myOtherPipe}}', standalone: false }) export class MyApp { } @NgModule({declarations: [MyPipe, MyOtherPipe, MyApp], providers: [Service]}) export class MyModule { }
{ "end_byte": 792, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_without_deps.ts_0_178
import {Injectable} from '@angular/core'; @Injectable() class MyAlternateService { } @Injectable({providedIn: 'root', useClass: MyAlternateService}) export class MyService { }
{ "end_byte": 178, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_without_deps.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_with_deps.ts_0_213
import {Injectable} from '@angular/core'; class SomeDep {} @Injectable() class MyAlternateService { } @Injectable({providedIn: 'root', useClass: MyAlternateService, deps: [SomeDep]}) export class MyService { }
{ "end_byte": 213, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_with_deps.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/component_factory.js_1_475
MyComponent.ɵfac = function MyComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyComponent)( $r3$.ɵɵinjectAttribute('name'), $r3$.ɵɵinjectAttribute(dynamicAttrName()), $r3$.ɵɵdirectiveInject(MyService), $r3$.ɵɵdirectiveInject(MyService, 1), $r3$.ɵɵdirectiveInject(MyService, 2), $r3$.ɵɵdirectiveInject(MyService, 4), $r3$.ɵɵdirectiveInject(MyService, 8), $r3$.ɵɵdirectiveInject(MyService, 10) ); }
{ "end_byte": 475, "start_byte": 1, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/component_factory.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/providedin_forwardref.js_0_505
Service.ɵfac = function Service_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Service)($i0$.ɵɵinject(Dep)); }; Service.ɵprov = /*@__PURE__*/ $i0$.ɵɵdefineInjectable({ token: Service, factory: Service.ɵfac, providedIn: $i0$.forwardRef(() => Mod) }); (() => { (typeof ngDevMode === "undefined" || ngDevMode) && $i0$.ɵsetClassMetadata(Service, [{ type: Injectable, args: [{ providedIn: forwardRef(() => Mod) }] }], () => [{ type: Dep }], null); })(); export class Mod { }
{ "end_byte": 505, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/providedin_forwardref.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_forwardref.js_0_187
SomeProvider.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: SomeProvider, factory: __ngFactoryType__ => SomeProviderImpl.ɵfac(__ngFactoryType__), providedIn: 'root' });
{ "end_byte": 187, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_forwardref.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload.ts_0_265
import {Injectable, Optional} from '@angular/core'; class MyDependency {} class MyOptionalDependency {} @Injectable() export class MyService { constructor(dep: MyDependency); constructor(dep: MyDependency, @Optional() optionalDep?: MyOptionalDependency) {} }
{ "end_byte": 265, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_with_deps.ts_0_361
import {Injectable, Optional} from '@angular/core'; class SomeDep {} class MyAlternateService { constructor(dep: SomeDep, optional: SomeDep|null) {} } @Injectable({ providedIn: 'root', useFactory: (dep: SomeDep, optional: SomeDep|null) => new MyAlternateService(dep, optional), deps: [SomeDep, [new Optional(), SomeDep]] }) export class MyService { }
{ "end_byte": 361, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_with_deps.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory.ts_0_143
import {Injectable} from '@angular/core'; class MyDependency {} @Injectable() export class MyService { constructor(dep: MyDependency) {} }
{ "end_byte": 143, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/injectable_factory.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js_0_8004
/**************************************************************************************************** * PARTIAL FILE: component_factory.js ****************************************************************************************************/ import { Attribute, Component, Host, Injectable, NgModule, Optional, Self, SkipSelf } from '@angular/core'; import * as i0 from "@angular/core"; export class MyService { } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable }] }); function dynamicAttrName() { return 'the-attr'; } export class MyComponent { constructor(name, other, s1, s2, s4, s3, s5, s6) { } } MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [{ token: 'name', attribute: true }, { token: dynamicAttrName(), attribute: true }, { token: MyService }, { token: MyService, host: true }, { token: MyService, self: true }, { token: MyService, skipSelf: true }, { token: MyService, optional: true }, { token: MyService, optional: true, self: true }], 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', template: ``, standalone: false }] }], ctorParameters: () => [{ type: undefined, decorators: [{ type: Attribute, args: ['name'] }] }, { type: undefined, decorators: [{ type: Attribute, args: [dynamicAttrName()] }] }, { type: MyService }, { type: MyService, decorators: [{ type: Host }] }, { type: MyService, decorators: [{ type: Self }] }, { type: MyService, decorators: [{ type: SkipSelf }] }, { type: MyService, decorators: [{ type: Optional }] }, { type: MyService, decorators: [{ type: Self }, { type: Optional }] }] }); 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, providers: [MyService] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyComponent], providers: [MyService] }] }] }); /**************************************************************************************************** * PARTIAL FILE: component_factory.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyService { static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } export declare class MyComponent { constructor(name: string, other: string, s1: MyService, s2: MyService, s4: MyService, s3: MyService, s5: MyService, s6: MyService); static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, [{ attribute: "name"; }, { attribute: unknown; }, null, { host: true; }, { self: true; }, { skipSelf: true; }, { optional: true; }, { optional: true; self: true; }]>; 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: injectable_factory.js ****************************************************************************************************/ import { Injectable } from '@angular/core'; import * as i0 from "@angular/core"; class MyDependency { } export class MyService { constructor(dep) { } } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [{ token: MyDependency }], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable }], ctorParameters: () => [{ type: MyDependency }] }); /**************************************************************************************************** * PARTIAL FILE: injectable_factory.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; declare class MyDependency { } export declare class MyService { constructor(dep: MyDependency); static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } export {}; /**************************************************************************************************** * PARTIAL FILE: ctor_overload.js ****************************************************************************************************/ import { Injectable, Optional } from '@angular/core'; import * as i0 from "@angular/core"; class MyDependency { } class MyOptionalDependency { } export class MyService { constructor(dep, optionalDep) { } } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [{ token: MyDependency }, { token: MyOptionalDependency, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable }], ctorParameters: () => [{ type: MyDependency }, { type: MyOptionalDependency, decorators: [{ type: Optional }] }] }); /**************************************************************************************************** * PARTIAL FILE: ctor_overload.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; declare class MyDependency { } export declare class MyService { constructor(dep: MyDependency); static ɵfac: i0.ɵɵFactoryDeclaration<MyService, [null, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } export {}; /***********************************************************************************
{ "end_byte": 8004, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js_8006_16057
*************** * PARTIAL FILE: usefactory_without_deps.js ****************************************************************************************************/ import { Injectable } from '@angular/core'; import * as i0 from "@angular/core"; class MyAlternateService { } function alternateFactory() { return new MyAlternateService(); } export class MyService { } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, providedIn: 'root', useFactory: alternateFactory }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable, args: [{ providedIn: 'root', useFactory: alternateFactory }] }] }); /**************************************************************************************************** * PARTIAL FILE: usefactory_without_deps.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyService { static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } /**************************************************************************************************** * PARTIAL FILE: usefactory_with_deps.js ****************************************************************************************************/ import { Injectable, Optional } from '@angular/core'; import * as i0 from "@angular/core"; class SomeDep { } class MyAlternateService { constructor(dep, optional) { } } export class MyService { } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, providedIn: 'root', useFactory: (dep, optional) => new MyAlternateService(dep, optional), deps: [{ token: SomeDep }, { token: SomeDep, optional: true }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable, args: [{ providedIn: 'root', useFactory: (dep, optional) => new MyAlternateService(dep, optional), deps: [SomeDep, [new Optional(), SomeDep]] }] }] }); /**************************************************************************************************** * PARTIAL FILE: usefactory_with_deps.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyService { static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } /**************************************************************************************************** * PARTIAL FILE: useclass_without_deps.js ****************************************************************************************************/ import { Injectable } from '@angular/core'; import * as i0 from "@angular/core"; class MyAlternateService { } MyAlternateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyAlternateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService, decorators: [{ type: Injectable }] }); export class MyService { } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, providedIn: 'root', useClass: MyAlternateService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable, args: [{ providedIn: 'root', useClass: MyAlternateService }] }] }); /**************************************************************************************************** * PARTIAL FILE: useclass_without_deps.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyService { static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } /**************************************************************************************************** * PARTIAL FILE: useclass_with_deps.js ****************************************************************************************************/ import { Injectable } from '@angular/core'; import * as i0 from "@angular/core"; class SomeDep { } class MyAlternateService { } MyAlternateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyAlternateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyAlternateService, decorators: [{ type: Injectable }] }); export class MyService { } MyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); MyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, providedIn: 'root', useClass: MyAlternateService, deps: [{ token: SomeDep }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyService, decorators: [{ type: Injectable, args: [{ providedIn: 'root', useClass: MyAlternateService, deps: [SomeDep] }] }] }); /**************************************************************************************************** * PARTIAL FILE: useclass_with_deps.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyService { static ɵfac: i0.ɵɵFactoryDeclaration<MyService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<MyService>; } /**************************************************************************************************** * PARTIAL FILE: useclass_forwardref.js ****************************************************************************************************/ import { forwardRef, Injectable } from '@angular/core'; import * as i0 from "@angular/core"; class SomeProvider { } SomeProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); SomeProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProvider, providedIn: 'root', useClass: i0.forwardRef(() => SomeProviderImpl) }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProvider, decorators: [{ type: Injectable, args
{ "end_byte": 16057, "start_byte": 8006, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js_16058_22902
[{ providedIn: 'root', useClass: forwardRef(() => SomeProviderImpl) }] }] }); class SomeProviderImpl extends SomeProvider { } SomeProviderImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProviderImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); SomeProviderImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProviderImpl }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeProviderImpl, decorators: [{ type: Injectable }] }); /**************************************************************************************************** * PARTIAL FILE: useclass_forwardref.d.ts ****************************************************************************************************/ export {}; /**************************************************************************************************** * PARTIAL FILE: providedin_forwardref.js ****************************************************************************************************/ import { forwardRef, Injectable, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; export class Dep { } Dep.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Dep, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); Dep.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Dep }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Dep, decorators: [{ type: Injectable }] }); export class Service { constructor(dep) { } } Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service, deps: [{ token: Dep }], target: i0.ɵɵFactoryTarget.Injectable }); Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service, providedIn: i0.forwardRef(() => Mod) }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service, decorators: [{ type: Injectable, args: [{ providedIn: forwardRef(() => Mod) }] }], ctorParameters: () => [{ type: Dep }] }); export class Mod { } Mod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Mod, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); Mod.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Mod }); Mod.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Mod }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Mod, decorators: [{ type: NgModule }] }); /**************************************************************************************************** * PARTIAL FILE: providedin_forwardref.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class Dep { static ɵfac: i0.ɵɵFactoryDeclaration<Dep, never>; static ɵprov: i0.ɵɵInjectableDeclaration<Dep>; } export declare class Service { constructor(dep: Dep); static ɵfac: i0.ɵɵFactoryDeclaration<Service, never>; static ɵprov: i0.ɵɵInjectableDeclaration<Service>; } export declare class Mod { static ɵfac: i0.ɵɵFactoryDeclaration<Mod, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<Mod, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<Mod>; } /**************************************************************************************************** * PARTIAL FILE: pipe_and_injectable.js ****************************************************************************************************/ import { Component, Injectable, NgModule, Pipe } from '@angular/core'; import * as i0 from "@angular/core"; class Service { } Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: Service, decorators: [{ type: Injectable }] }); export class MyPipe { constructor(service) { } transform(value, ...args) { return value; } } MyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyPipe, deps: [{ token: Service }], target: i0.ɵɵFactoryTarget.Pipe }); MyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyPipe, isStandalone: false, name: "myPipe" }); MyPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyPipe }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyPipe, decorators: [{ type: Injectable }, { type: Pipe, args: [{ name: 'myPipe', standalone: false }] }], ctorParameters: () => [{ type: Service }] }); export class MyOtherPipe { constructor(service) { } transform(value, ...args) { return value; } } MyOtherPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyOtherPipe, deps: [{ token: Service }], target: i0.ɵɵFactoryTarget.Pipe }); MyOtherPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyOtherPipe, isStandalone: false, name: "myOtherPipe" }); MyOtherPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyOtherPipe }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyOtherPipe, decorators: [{ type: Pipe, args: [{ name: 'myOtherPipe', standalone: false }] }, { type: Injectable }], ctorParameters: () => [{ type: Service }] }); 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, isStanda
{ "end_byte": 22902, "start_byte": 16058, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js_22903_26170
one: false, selector: "my-app", ngImport: i0, template: '{{0 | myPipe | myOtherPipe}}', isInline: true, dependencies: [{ kind: "pipe", type: MyPipe, name: "myPipe" }, { kind: "pipe", type: MyOtherPipe, name: "myOtherPipe" }] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{ type: Component, args: [{ selector: 'my-app', template: '{{0 | myPipe | myOtherPipe}}', 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: [MyPipe, MyOtherPipe, MyApp] }); MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, providers: [Service] }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{ type: NgModule, args: [{ declarations: [MyPipe, MyOtherPipe, MyApp], providers: [Service] }] }] }); /**************************************************************************************************** * PARTIAL FILE: pipe_and_injectable.d.ts ****************************************************************************************************/ import { PipeTransform } from '@angular/core'; import * as i0 from "@angular/core"; declare class Service { static ɵfac: i0.ɵɵFactoryDeclaration<Service, never>; static ɵprov: i0.ɵɵInjectableDeclaration<Service>; } export declare class MyPipe implements PipeTransform { constructor(service: Service); transform(value: any, ...args: any[]): any; static ɵfac: i0.ɵɵFactoryDeclaration<MyPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<MyPipe, "myPipe", false>; static ɵprov: i0.ɵɵInjectableDeclaration<MyPipe>; } export declare class MyOtherPipe implements PipeTransform { constructor(service: Service); transform(value: any, ...args: any[]): any; static ɵfac: i0.ɵɵFactoryDeclaration<MyOtherPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<MyOtherPipe, "myOtherPipe", false>; static ɵprov: i0.ɵɵInjectableDeclaration<MyOtherPipe>; } 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 MyPipe, typeof MyOtherPipe, typeof MyApp], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } export {};
{ "end_byte": 26170, "start_byte": 22903, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_without_deps.js_0_143
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: () => alternateFactory(), providedIn: 'root' });
{ "end_byte": 143, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_without_deps.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload_fac.js_0_188
MyService.ɵfac = function MyService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyService)($r3$.ɵɵinject(MyDependency), $r3$.ɵɵinject(MyOptionalDependency, 8)); }
{ "end_byte": 188, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload_fac.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_without_deps.js_0_183
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: __ngFactoryType__ => MyAlternateService.ɵfac(__ngFactoryType__), providedIn: 'root' });
{ "end_byte": 183, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_without_deps.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_with_deps.js_0_437
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: function MyService_Factory(__ngFactoryType__) { let __ngConditionalFactory__ = null; if (__ngFactoryType__) { __ngConditionalFactory__ = new __ngFactoryType__(); } else { __ngConditionalFactory__ = new MyAlternateService($r3$.ɵɵinject(SomeDep)); } return __ngConditionalFactory__; }, providedIn: 'root' });
{ "end_byte": 437, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_with_deps.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/providedin_forwardref.ts_0_233
import {forwardRef, Injectable, NgModule} from '@angular/core'; @Injectable() export class Dep { } @Injectable({providedIn: forwardRef(() => Mod)}) export class Service { constructor(dep: Dep) {} } @NgModule() export class Mod { }
{ "end_byte": 233, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/providedin_forwardref.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/component_factory.ts_0_703
import {Attribute, Component, Host, Injectable, NgModule, Optional, Self, SkipSelf} from '@angular/core'; @Injectable() export class MyService { } function dynamicAttrName() { return 'the-attr'; } @Component({ selector: 'my-component', template: ``, standalone: false }) export class MyComponent { constructor( @Attribute('name') name: string, @Attribute(dynamicAttrName()) other: string, s1: MyService, @Host() s2: MyService, @Self() s4: MyService, @SkipSelf() s3: MyService, @Optional() s5: MyService, @Self() @Optional() s6: MyService, ) {} } @NgModule({declarations: [MyComponent], providers: [MyService]}) export class MyModule { }
{ "end_byte": 703, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/component_factory.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_forwardref.ts_0_230
import {forwardRef, Injectable} from '@angular/core'; @Injectable({providedIn: 'root', useClass: forwardRef(() => SomeProviderImpl)}) abstract class SomeProvider { } @Injectable() class SomeProviderImpl extends SomeProvider { }
{ "end_byte": 230, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/useclass_forwardref.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload_prov.js_0_112
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: MyService.ɵfac });
{ "end_byte": 112, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/ctor_overload_prov.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable_pipe_first.js_0_471
// NOTE The prov definition must be last so MyOtherPipe.fac is defined MyOtherPipe.ɵfac = function MyOtherPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyOtherPipe)($r3$.ɵɵdirectiveInject(Service, 16)); }; MyOtherPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "myOtherPipe", type: MyOtherPipe, pure: true, standalone: false }); MyOtherPipe.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MyOtherPipe, factory: MyOtherPipe.ɵfac });
{ "end_byte": 471, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/pipe_and_injectable_pipe_first.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_without_deps.ts_0_231
import {Injectable} from '@angular/core'; class MyAlternateService {} function alternateFactory() { return new MyAlternateService(); } @Injectable({providedIn: 'root', useFactory: alternateFactory}) export class MyService { }
{ "end_byte": 231, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_without_deps.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_with_deps.js_0_502
MyService.ɵprov = /*@__PURE__*/ $r3$.ɵɵdefineInjectable({ token: MyService, factory: function MyService_Factory(__ngFactoryType__) { let __ngConditionalFactory__ = null; if (__ngFactoryType__) { __ngConditionalFactory__ = new __ngFactoryType__(); } else { __ngConditionalFactory__ = ((dep, optional) => new MyAlternateService(dep, optional))($r3$.ɵɵinject(SomeDep), $r3$.ɵɵinject(SomeDep, 8)); } return __ngConditionalFactory__; }, providedIn: 'root' });
{ "end_byte": 502, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_di/di/usefactory_with_deps.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_component.js_0_652
TestComp.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ … contentQueries: function TestComp_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { i0.ɵɵcontentQuerySignal(dirIndex, ctx.query3, _c0, 5); i0.ɵɵcontentQuerySignal(dirIndex, ctx.query4, _c1, 4); } if (rf & 2) { i0.ɵɵqueryAdvance(2); } }, viewQuery: function TestComp_Query(rf, ctx) { if (rf & 1) { i0.ɵɵviewQuerySignal(ctx.query1, _c2, 5); i0.ɵɵviewQuerySignal(ctx.query2, _c3, 5); } if (rf & 2) { i0.ɵɵqueryAdvance(2); } }, … });
{ "end_byte": 652, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_component.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/mixed_query_variants.ts_0_340
import {ContentChild, contentChild, Directive, ViewChild, viewChild} from '@angular/core'; @Directive({ }) export class TestDir { @ViewChild('locator1') decoratorViewChild: unknown; signalViewChild = viewChild('locator1'); @ContentChild('locator2') decoratorContentChild: unknown; signalContentChild = contentChild('locator2'); }
{ "end_byte": 340, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/mixed_query_variants.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_directive.js_0_1175
const _c0 = ["locatorC"]; const _c1 = ["locatorD"]; const _c2 = ["locatorF", "locatorG"]; const _c3 = ["locatorA"]; const _c4 = ["locatorB"]; const _c5 = ["locatorE"]; … TestDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … contentQueries: function TestDir_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { i0.ɵɵcontentQuerySignal(dirIndex, ctx.query3, _c0, 5); i0.ɵɵcontentQuerySignal(dirIndex, ctx.query4, _c1, 4); i0.ɵɵcontentQuerySignal(dirIndex, ctx.query8, _c2, 5); i0.ɵɵcontentQuerySignal(dirIndex, ctx.query9, nonAnalyzableRefersToString, 5); } if (rf & 2) { i0.ɵɵqueryAdvance(4); } }, viewQuery: function TestDir_Query(rf, ctx) { if (rf & 1) { i0.ɵɵviewQuerySignal(ctx.query1, _c3, 5); i0.ɵɵviewQuerySignal(ctx.query2, _c4, 5); i0.ɵɵviewQuerySignal(ctx.query5, SomeToken, 5); i0.ɵɵviewQuerySignal(ctx.query6, SomeToken, 5); i0.ɵɵviewQuerySignal(ctx.query7, _c5, 5, SomeToken); } if (rf & 2) { i0.ɵɵqueryAdvance(5); } } … });
{ "end_byte": 1175, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_directive.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/GOLDEN_PARTIAL.js_0_8449
/**************************************************************************************************** * PARTIAL FILE: query_in_directive.js ****************************************************************************************************/ import { contentChild, contentChildren, Directive, forwardRef, viewChild, viewChildren } from '@angular/core'; import * as i0 from "@angular/core"; export class SomeToken { } const nonAnalyzableRefersToString = 'a, b, c'; export class TestDir { constructor() { this.query1 = viewChild('locatorA'); this.query2 = viewChildren('locatorB'); this.query3 = contentChild('locatorC'); this.query4 = contentChildren('locatorD'); this.query5 = viewChild(forwardRef(() => SomeToken)); this.query6 = viewChildren(SomeToken); this.query7 = viewChild('locatorE', { read: SomeToken }); this.query8 = contentChildren('locatorF, locatorG', { descendants: true }); this.query9 = contentChildren(nonAnalyzableRefersToString, { descendants: 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.2.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, queries: [{ propertyName: "query3", first: true, predicate: ["locatorC"], descendants: true, isSignal: true }, { propertyName: "query4", predicate: ["locatorD"], isSignal: true }, { propertyName: "query8", predicate: ["locatorF, locatorG"], descendants: true, isSignal: true }, { propertyName: "query9", predicate: nonAnalyzableRefersToString, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "query1", first: true, predicate: ["locatorA"], descendants: true, isSignal: true }, { propertyName: "query2", predicate: ["locatorB"], descendants: true, isSignal: true }, { propertyName: "query5", first: true, predicate: i0.forwardRef(() => SomeToken), descendants: true, isSignal: true }, { propertyName: "query6", predicate: SomeToken, descendants: true, isSignal: true }, { propertyName: "query7", first: true, predicate: ["locatorE"], descendants: true, read: SomeToken, isSignal: true }], ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }] }); /**************************************************************************************************** * PARTIAL FILE: query_in_directive.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class SomeToken { } export declare class TestDir { query1: import("@angular/core").Signal<unknown>; query2: import("@angular/core").Signal<readonly unknown[]>; query3: import("@angular/core").Signal<unknown>; query4: import("@angular/core").Signal<readonly unknown[]>; query5: import("@angular/core").Signal<any>; query6: import("@angular/core").Signal<readonly SomeToken[]>; query7: import("@angular/core").Signal<SomeToken | undefined>; query8: import("@angular/core").Signal<readonly unknown[]>; query9: import("@angular/core").Signal<readonly unknown[]>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, {}, ["query3", "query4", "query8", "query9"], never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: query_in_component.js ****************************************************************************************************/ import { Component, contentChild, contentChildren, viewChild, viewChildren } from '@angular/core'; import * as i0 from "@angular/core"; export class TestComp { constructor() { this.query1 = viewChild('locatorA'); this.query2 = viewChildren('locatorB'); this.query3 = contentChild('locatorC'); this.query4 = contentChildren('locatorD'); } } 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.2.0", version: "0.0.0-PLACEHOLDER", type: TestComp, isStandalone: true, selector: "ng-component", queries: [{ propertyName: "query3", first: true, predicate: ["locatorC"], descendants: true, isSignal: true }, { propertyName: "query4", predicate: ["locatorD"], isSignal: true }], viewQueries: [{ propertyName: "query1", first: true, predicate: ["locatorA"], descendants: true, isSignal: true }, { propertyName: "query2", predicate: ["locatorB"], descendants: true, isSignal: true }], 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: query_in_component.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestComp { query1: import("@angular/core").Signal<unknown>; query2: import("@angular/core").Signal<readonly unknown[]>; query3: import("@angular/core").Signal<unknown>; query4: import("@angular/core").Signal<readonly unknown[]>; static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, {}, ["query3", "query4"], never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: mixed_query_variants.js ****************************************************************************************************/ import { ContentChild, contentChild, Directive, ViewChild, viewChild } from '@angular/core'; import * as i0 from "@angular/core"; export class TestDir { constructor() { this.signalViewChild = viewChild('locator1'); this.signalContentChild = contentChild('locator2'); } } 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.2.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, queries: [{ propertyName: "signalContentChild", first: true, predicate: ["locator2"], descendants: true, isSignal: true }, { propertyName: "decoratorContentChild", first: true, predicate: ["locator2"], descendants: true }], viewQueries: [{ propertyName: "signalViewChild", first: true, predicate: ["locator1"], descendants: true, isSignal: true }, { propertyName: "decoratorViewChild", first: true, predicate: ["locator1"], descendants: true }], ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }], propDecorators: { decoratorViewChild: [{ type: ViewChild, args: ['locator1'] }], decoratorContentChild: [{ type: ContentChild, args: ['locator2'] }] } }); /**************************************************************************************************** * PARTIAL FILE: mixed_query_variants.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { decoratorViewChild: unknown; signalViewChild: import("@angular/core").Signal<unknown>; decoratorContentChild: unknown; signalContentChild: import("@angular/core").Signal<unknown>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, {}, ["signalContentChild", "decoratorContentChild"], never, true, never>; }
{ "end_byte": 8449, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_component.ts_0_309
import {Component, contentChild, contentChildren, viewChild, viewChildren} from '@angular/core'; @Component({ template: 'Works', }) export class TestComp { query1 = viewChild('locatorA'); query2 = viewChildren('locatorB'); query3 = contentChild('locatorC'); query4 = contentChildren('locatorD'); }
{ "end_byte": 309, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_component.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/mixed_query_variants.js_0_772
TestDir.ɵdir = /* @__PURE__ */ $r3$.ɵɵdefineDirective({ … contentQueries: function TestDir_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { i0.ɵɵcontentQuerySignal(dirIndex, ctx.signalContentChild, _c0, 5); i0.ɵɵcontentQuery(dirIndex, _c0, 5); } if (rf & 2) { i0.ɵɵqueryAdvance(); let _t; i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.decoratorContentChild = _t.first); } }, viewQuery: function TestDir_Query(rf, ctx) { if (rf & 1) { i0.ɵɵviewQuerySignal(ctx.signalViewChild, _c1, 5); i0.ɵɵviewQuery(_c1, 5); } if (rf & 2) { i0.ɵɵqueryAdvance(); let _t; i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.decoratorViewChild = _t.first); } } … });
{ "end_byte": 772, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/mixed_query_variants.js" }
angular/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_directive.ts_0_664
import {contentChild, contentChildren, Directive, forwardRef, viewChild, viewChildren} from '@angular/core'; export class SomeToken {} const nonAnalyzableRefersToString = 'a, b, c'; @Directive({ }) export class TestDir { query1 = viewChild('locatorA'); query2 = viewChildren('locatorB'); query3 = contentChild('locatorC'); query4 = contentChildren('locatorD'); query5 = viewChild(forwardRef(() => SomeToken)); query6 = viewChildren(SomeToken); query7 = viewChild('locatorE', {read: SomeToken}); query8 = contentChildren('locatorF, locatorG', {descendants: true}); query9 = contentChildren(nonAnalyzableRefersToString, {descendants: true}); }
{ "end_byte": 664, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/signal_queries/query_in_directive.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/component.ts_0_442
import {Component, Input, NgModule, Output} from '@angular/core'; @Component({ selector: 'my-component', template: '', standalone: false }) export class MyComponent { @Input() componentInput: any; @Input('renamedComponentInput') originalComponentInput: any; @Output() componentOutput: any; @Output('renamedComponentOutput') originalComponentOutput: any; } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 442, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/component.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/input_transform_definition.js_0_363
MyDirective.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … inputs: { functionDeclarationInput: [2, "functionDeclarationInput", "functionDeclarationInput", toNumber], inlineFunctionInput: [2, "inlineFunctionInput", "inlineFunctionInput", (value, _) => value ? 1 : 0] }, standalone: false, features: [$r3$.ɵɵInputTransformsFeature]… });
{ "end_byte": 363, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/input_transform_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/directive.ts_0_430
import {Directive, Input, NgModule, Output} from '@angular/core'; @Directive({ selector: '[my-directive]', standalone: false }) export class MyDirective { @Input() directiveInput: any; @Input('renamedDirectiveInput') originalDirectiveInput: any; @Output() directiveOutput: any; @Output('renamedDirectiveOutput') originalDirectiveOutput: any; } @NgModule({declarations: [MyDirective]}) export class MyModule { }
{ "end_byte": 430, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/directive.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js_0_7982
/**************************************************************************************************** * PARTIAL FILE: component.js ****************************************************************************************************/ import { Component, Input, NgModule, Output } 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", inputs: { componentInput: "componentInput", originalComponentInput: ["renamedComponentInput", "originalComponentInput"] }, outputs: { componentOutput: "componentOutput", originalComponentOutput: "renamedComponentOutput" }, 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: '', standalone: false }] }], propDecorators: { componentInput: [{ type: Input }], originalComponentInput: [{ type: Input, args: ['renamedComponentInput'] }], componentOutput: [{ type: Output }], originalComponentOutput: [{ type: Output, args: ['renamedComponentOutput'] }] } }); 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.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyComponent { componentInput: any; originalComponentInput: any; componentOutput: any; originalComponentOutput: any; static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, { "componentInput": { "alias": "componentInput"; "required": false; }; "originalComponentInput": { "alias": "renamedComponentInput"; "required": false; }; }, { "componentOutput": "componentOutput"; "originalComponentOutput": "renamedComponentOutput"; }, 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.js ****************************************************************************************************/ import { Directive, Input, NgModule, Output } from '@angular/core'; import * as i0 from "@angular/core"; export class MyDirective { } MyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); MyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyDirective, isStandalone: false, selector: "[my-directive]", inputs: { directiveInput: "directiveInput", originalDirectiveInput: ["renamedDirectiveInput", "originalDirectiveInput"] }, outputs: { directiveOutput: "directiveOutput", originalDirectiveOutput: "renamedDirectiveOutput" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyDirective, decorators: [{ type: Directive, args: [{ selector: '[my-directive]', standalone: false }] }], propDecorators: { directiveInput: [{ type: Input }], originalDirectiveInput: [{ type: Input, args: ['renamedDirectiveInput'] }], directiveOutput: [{ type: Output }], originalDirectiveOutput: [{ type: Output, args: ['renamedDirectiveOutput'] }] } }); 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: [MyDirective] }); 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: [MyDirective] }] }] }); /**************************************************************************************************** * PARTIAL FILE: directive.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyDirective { directiveInput: any; originalDirectiveInput: any; directiveOutput: any; originalDirectiveOutput: any; static ɵfac: i0.ɵɵFactoryDeclaration<MyDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MyDirective, "[my-directive]", never, { "directiveInput": { "alias": "directiveInput"; "required": false; }; "originalDirectiveInput": { "alias": "renamedDirectiveInput"; "required": false; }; }, { "directiveOutput": "directiveOutput"; "originalDirectiveOutput": "renamedDirectiveOutput"; }, never, never, false, never>; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyDirective], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; } /**************************************************************************************************** * PARTIAL FILE: input_transform.js ****************************************************************************************************/ import { Directive, Input, NgModule } from '@angular/core'; import * as i0 from "@angular/core"; function toNumber(value) { return value ? 1 : 0; } export class MyDirective { } MyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); MyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "0.0.0-PLACEHOLDER", type: MyDirective, isStandalone: false, selector: "[my-directive]", inputs: { functionDeclarationInput: ["functionDeclarationInput", "functionDeclarationInput", toNumber], inlineFunctionInput: ["inlineFunctionInput", "inlineFunctionInput", (value, _) => value ? 1 : 0] }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", n
{ "end_byte": 7982, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js_7983_10397
Import: i0, type: MyDirective, decorators: [{ type: Directive, args: [{ selector: '[my-directive]', standalone: false }] }], propDecorators: { functionDeclarationInput: [{ type: Input, args: [{ transform: toNumber }] }], inlineFunctionInput: [{ type: Input, args: [{ transform: (value, _) => value ? 1 : 0 }] }] } }); 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: [MyDirective] }); 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: [MyDirective] }] }] }); /**************************************************************************************************** * PARTIAL FILE: input_transform.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class MyDirective { functionDeclarationInput: any; inlineFunctionInput: any; static ɵfac: i0.ɵɵFactoryDeclaration<MyDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MyDirective, "[my-directive]", never, { "functionDeclarationInput": { "alias": "functionDeclarationInput"; "required": false; }; "inlineFunctionInput": { "alias": "inlineFunctionInput"; "required": false; }; }, {}, never, never, false, never>; static ngAcceptInputType_functionDeclarationInput: number | string; static ngAcceptInputType_inlineFunctionInput: string | number; } export declare class MyModule { static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyDirective], never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>; }
{ "end_byte": 10397, "start_byte": 7983, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/input_transform.ts_0_654
import {Directive, Input, NgModule} from '@angular/core'; function toNumber(value: number|string) { return value ? 1 : 0; } @Directive({ selector: '[my-directive]', standalone: false }) export class MyDirective { @Input({transform: toNumber}) functionDeclarationInput: any; // There's an extra `_` parameter, because full compilation strips the parentheses around the // parameters while partial compilation keeps them. This ensures consistent output. // @ts-ignore @Input({transform: (value: string|number, _: any) => value ? 1 : 0}) inlineFunctionInput: any; } @NgModule({declarations: [MyDirective]}) export class MyModule { }
{ "end_byte": 654, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/input_transform.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/component_definition.js_0_325
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ … inputs:{ componentInput: "componentInput", originalComponentInput: [0, "renamedComponentInput", "originalComponentInput"] }, outputs: { componentOutput: "componentOutput", originalComponentOutput: "renamedComponentOutput" } … });
{ "end_byte": 325, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/component_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/directive_definition.js_0_325
MyDirective.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … inputs:{ directiveInput: "directiveInput", originalDirectiveInput: [0, "renamedDirectiveInput", "originalDirectiveInput"] }, outputs: { directiveOutput: "directiveOutput", originalDirectiveOutput: "renamedDirectiveOutput" } … });
{ "end_byte": 325, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_input_outputs/directive_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/mixed_variants.js_0_347
TestDir.ɵdir = /* @__PURE__ */ $r3$.ɵɵdefineDirective({ … outputs: { click1: "click1", click2: "click2", click3: "click3", _bla: "decoratorPublicName", _bla2: "decoratorPublicName2", clickDecorator1: "clickDecorator1", clickDecorator2: "clickDecorator2", _blaDecorator: "decoratorPublicName" } … });
{ "end_byte": 347, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/mixed_variants.js" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_component.js_0_187
TestComp.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({ … outputs: { a: "a", b: "b", c: "cPublic", d: "d", e: "e" }, … });
{ "end_byte": 187, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_component.js" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/GOLDEN_PARTIAL.js_0_7445
/**************************************************************************************************** * PARTIAL FILE: output_in_directive.js ****************************************************************************************************/ import { Directive, EventEmitter, output } from '@angular/core'; import { outputFromObservable } from '@angular/core/rxjs-interop'; import * as i0 from "@angular/core"; export class TestDir { constructor() { this.a = output(); this.b = output({}); this.c = output({ alias: 'cPublic' }); this.d = outputFromObservable(new EventEmitter()); this.e = outputFromObservable(new EventEmitter()); } } 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: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, outputs: { a: "a", b: "b", c: "cPublic", d: "d", e: "e" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{}] }] }); /**************************************************************************************************** * PARTIAL FILE: output_in_directive.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestDir { a: import("@angular/core").OutputEmitterRef<void>; b: import("@angular/core").OutputEmitterRef<string>; c: import("@angular/core").OutputEmitterRef<void>; d: import("@angular/core").OutputRef<unknown>; e: import("@angular/core").OutputRef<unknown>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, { "a": "a"; "b": "b"; "c": "cPublic"; "d": "d"; "e": "e"; }, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: output_in_component.js ****************************************************************************************************/ import { Component, EventEmitter, output } from '@angular/core'; import { outputFromObservable } from '@angular/core/rxjs-interop'; import * as i0 from "@angular/core"; export class TestComp { constructor() { this.a = output(); this.b = output({}); this.c = output({ alias: 'cPublic' }); this.d = outputFromObservable(new EventEmitter()); this.e = outputFromObservable(new EventEmitter()); } } 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: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestComp, isStandalone: true, selector: "ng-component", outputs: { a: "a", b: "b", c: "cPublic", d: "d", e: "e" }, 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: output_in_component.d.ts ****************************************************************************************************/ import * as i0 from "@angular/core"; export declare class TestComp { a: import("@angular/core").OutputEmitterRef<void>; b: import("@angular/core").OutputEmitterRef<string>; c: import("@angular/core").OutputEmitterRef<void>; d: import("@angular/core").OutputRef<unknown>; e: import("@angular/core").OutputRef<unknown>; static ɵfac: i0.ɵɵFactoryDeclaration<TestComp, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TestComp, "ng-component", never, {}, { "a": "a"; "b": "b"; "c": "cPublic"; "d": "d"; "e": "e"; }, never, never, true, never>; } /**************************************************************************************************** * PARTIAL FILE: mixed_variants.js ****************************************************************************************************/ import { Directive, EventEmitter, Output, output } from '@angular/core'; import { outputFromObservable } from '@angular/core/rxjs-interop'; import * as i0 from "@angular/core"; export class TestDir { constructor() { this.click1 = output(); this.click2 = output(); this.click3 = outputFromObservable(new EventEmitter()); this._bla = output({ alias: 'decoratorPublicName' }); this._bla2 = outputFromObservable(new EventEmitter(), { alias: 'decoratorPublicName2' }); this.clickDecorator1 = new EventEmitter(); this.clickDecorator2 = new EventEmitter(); this._blaDecorator = new EventEmitter(); } } 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: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestDir, isStandalone: true, outputs: { click1: "click1", click2: "click2", click3: "click3", _bla: "decoratorPublicName", _bla2: "decoratorPublicName2", clickDecorator1: "clickDecorator1", clickDecorator2: "clickDecorator2", _blaDecorator: "decoratorPublicName" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestDir, decorators: [{ type: Directive, args: [{ standalone: true, }] }], propDecorators: { clickDecorator1: [{ type: Output }], clickDecorator2: [{ type: Output }], _blaDecorator: [{ type: Output, args: ['decoratorPublicName'] }] } }); /**************************************************************************************************** * PARTIAL FILE: mixed_variants.d.ts ****************************************************************************************************/ import { EventEmitter } from '@angular/core'; import * as i0 from "@angular/core"; export declare class TestDir { click1: import("@angular/core").OutputEmitterRef<void>; click2: import("@angular/core").OutputEmitterRef<boolean>; click3: import("@angular/core").OutputRef<unknown>; _bla: import("@angular/core").OutputEmitterRef<void>; _bla2: import("@angular/core").OutputRef<unknown>; clickDecorator1: EventEmitter<any>; clickDecorator2: EventEmitter<boolean>; _blaDecorator: EventEmitter<void>; static ɵfac: i0.ɵɵFactoryDeclaration<TestDir, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TestDir, never, never, {}, { "click1": "click1"; "click2": "click2"; "click3": "click3"; "_bla": "decoratorPublicName"; "_bla2": "decoratorPublicName2"; "clickDecorator1": "clickDecorator1"; "clickDecorator2": "clickDecorator2"; "_blaDecorator": "decoratorPublicName"; }, never, never, true, never>; }
{ "end_byte": 7445, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_directive.js_0_185
TestDir.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ … outputs: { a: "a", b: "b", c: "cPublic", d: "d", e: "e" } … });
{ "end_byte": 185, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_directive.js" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/mixed_variants.ts_0_635
import {Directive, EventEmitter, Output, output} from '@angular/core'; import {outputFromObservable} from '@angular/core/rxjs-interop'; @Directive({ standalone: true, }) export class TestDir { click1 = output(); click2 = output<boolean>(); click3 = outputFromObservable(new EventEmitter<number>()); _bla = output<void>({alias: 'decoratorPublicName'}); _bla2 = outputFromObservable(new EventEmitter(), {alias: 'decoratorPublicName2'}); @Output() clickDecorator1 = new EventEmitter(); @Output() clickDecorator2 = new EventEmitter<boolean>(); @Output('decoratorPublicName') _blaDecorator = new EventEmitter<void>(); }
{ "end_byte": 635, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/mixed_variants.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_component.ts_0_386
import {Component, EventEmitter, output} from '@angular/core'; import {outputFromObservable} from '@angular/core/rxjs-interop'; @Component({ template: 'Works', }) export class TestComp { a = output(); b = output<string>({}); c = output<void>({alias: 'cPublic'}); d = outputFromObservable(new EventEmitter<string>()); e = outputFromObservable(new EventEmitter<number>()); }
{ "end_byte": 386, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_component.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_directive.ts_0_364
import {Directive, EventEmitter, output} from '@angular/core'; import {outputFromObservable} from '@angular/core/rxjs-interop'; @Directive({ }) export class TestDir { a = output(); b = output<string>({}); c = output<void>({alias: 'cPublic'}); d = outputFromObservable(new EventEmitter<string>()); e = outputFromObservable(new EventEmitter<number>()); }
{ "end_byte": 364, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/output_function/output_in_directive.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers_factory.js_0_122
MyComponent.ɵfac = function MyComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyComponent)(); };
{ "end_byte": 122, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers_factory.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers_definition.js_0_294
MyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MyComponent, selectors: [["my-component"]], standalone: false, decls: 1, vars: 0, template: function MyComponent_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "div"); } }, encapsulation: 2 });
{ "end_byte": 294, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers_definition.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_providers_only.ts_0_446
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 }], standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 446, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_providers_only.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js_0_7396
/**************************************************************************************************** * PARTIAL FILE: providers_feature_providers_and_view_providers.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: providers_feature_providers_and_view_providers.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: providers_feature_providers_only.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 }); 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 }], 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: providers_feature_providers_only.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: providers_feature_view_providers_only.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", 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>', 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",
{ "end_byte": 7396, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js_7397_11101
gImport: 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: providers_feature_view_providers_only.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: providers_feature_no_providers.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: '<div></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></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: providers_feature_no_providers.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": 11101, "start_byte": 7397, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/GOLDEN_PARTIAL.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_providers_and_view_providers.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_providers/providers_feature_providers_and_view_providers.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_view_providers_only.ts_0_399
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>', viewProviders: [GreeterEN], standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 399, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_view_providers_only.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers.ts_0_242
import {Component, NgModule} from '@angular/core'; @Component({ selector: 'my-component', template: '<div></div>', standalone: false }) export class MyComponent { } @NgModule({declarations: [MyComponent]}) export class MyModule { }
{ "end_byte": 242, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_providers/providers_feature_no_providers.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/defer_hydrate_order_template.js_0_365
function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtemplate(0, MyApp_Defer_0_Template, 1, 0)(1, MyApp_DeferPlaceholder_1_Template, 2, 0); $r3$.ɵɵdefer(2, 0, null, null, 1); $r3$.ɵɵdeferHydrateOnTimer(1337); $r3$.ɵɵdeferPrefetchOnViewport(0, -1); } if (rf & 2) { $r3$.ɵɵadvance(2); $r3$.ɵɵdeferWhen(ctx.isReady); } }
{ "end_byte": 365, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/defer_hydrate_order_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_with_prefetch_triggers_template.js_0_664
function MyApp_Template(rf, ctx) { if (rf & 1) { $r3$.ɵɵtext(0); $r3$.ɵɵtemplate(1, MyApp_Defer_1_Template, 1, 1)(2, MyApp_DeferPlaceholder_2_Template, 3, 0); $r3$.ɵɵdefer(3, 1, null, null, 2); $r3$.ɵɵdeferPrefetchOnIdle(); $r3$.ɵɵdeferPrefetchOnImmediate(); $r3$.ɵɵdeferPrefetchOnTimer(1337); $r3$.ɵɵdeferPrefetchOnHover(0, -1); $r3$.ɵɵdeferPrefetchOnInteraction(0, -1); $r3$.ɵɵdeferPrefetchOnViewport(0, -1); $r3$.ɵɵdeferOnIdle(); } if (rf & 2) { $r3$.ɵɵtextInterpolate1(" ", ctx.message, " "); $r3$.ɵɵadvance(3); $r3$.ɵɵdeferPrefetchWhen(ctx.isVisible() || ctx.isReady); } }
{ "end_byte": 664, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_with_prefetch_triggers_template.js" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_with_external_deps.ts_0_458
import {Component} from '@angular/core'; import {EagerDep} from './deferred_with_external_deps_eager'; import {LazyDep} from './deferred_with_external_deps_lazy'; import {LoadingDep} from './deferred_with_external_deps_loading'; @Component({ template: ` <div> <eager-dep/> @defer { <lazy-dep/> } @loading { <loading-dep/> } </div> `, imports: [EagerDep, LazyDep, LoadingDep], }) export class MyApp { }
{ "end_byte": 458, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/deferred_with_external_deps.ts" }
angular/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/defer_deps.ts_0_331
import {Component} from '@angular/core'; import {CmpA} from './defer_deps_ext'; @Component({ selector: 'local-dep', template: 'Local dependency', }) export class LocalDep { } @Component({ selector: 'test-cmp', imports: [CmpA, LocalDep], template: ` @defer { <cmp-a /> <local-dep /> } `, }) export class TestCmp { }
{ "end_byte": 331, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_deferred/defer_deps.ts" }