forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from angular/main
Create a new pull request by comparing changes across two branches
- Loading branch information
Showing
51 changed files
with
669 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...e/test_cases/r3_view_compiler_i18n/ng-container_ng-template/self_closing_tags.pipeline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
function MyComponent_ng_template_3_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵi18nStart(0, 1); | ||
$r3$.ɵɵelement(1, "img", 2); | ||
$r3$.ɵɵi18nEnd(); | ||
} | ||
} | ||
… | ||
consts: () => { | ||
__i18nMsg__('{$tagImg} is my logo #1 ', [['tagImg', String.raw`\uFFFD#2\uFFFD\uFFFD/#2\uFFFD`]], {original_code: {tagImg: '<img src="logo.png" title="Logo" />'}}, {}) | ||
__i18nMsg__('{$tagImg} is my logo #2 ', [['tagImg', String.raw`\uFFFD#1\uFFFD\uFFFD/#1\uFFFD`]], {original_code: {tagImg: '<img src="logo.png" title="Logo" />'}}, {}) | ||
return [ | ||
$i18n_0$, | ||
$i18n_1$, | ||
["src", "logo.png", "title", "Logo"] | ||
]; | ||
}, | ||
template: function MyComponent_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵelementContainerStart(0); | ||
$r3$.ɵɵi18nStart(1, 0); | ||
$r3$.ɵɵelement(2, "img", 2); | ||
$r3$.ɵɵi18nEnd(); | ||
$r3$.ɵɵelementContainerEnd(); | ||
$r3$.ɵɵtemplate(3, MyComponent_ng_template_3_Template, 2, 0, "ng-template"); | ||
} | ||
} |
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
...st_cases/r3_view_compiler_i18n/ng-container_ng-template/structural_directives.pipeline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// NOTE: applying structural directives to <ng-template> is typically user error, but it is technically allowed, so we need to support it. | ||
function MyComponent_0_ng_template_0_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵi18n(0, 0); | ||
} | ||
} | ||
function MyComponent_0_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 1, 0, "ng-template"); | ||
} | ||
} | ||
… | ||
function MyComponent_ng_container_1_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵelementContainerStart(0); | ||
$r3$.ɵɵi18n(1, 1); | ||
$r3$.ɵɵelementContainerEnd(); | ||
} | ||
} | ||
… | ||
decls: 2, | ||
vars: 2, | ||
consts: () => { | ||
__i18nMsg__('Content A', [], {}, {}) | ||
__i18nMsg__('Content B', [], {}, {}) | ||
return [ | ||
$i18n_0$, | ||
$i18n_1$, | ||
[__AttributeMarker.Template__, "ngIf"] | ||
]; | ||
}, | ||
template: function MyComponent_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵtemplate(0, MyComponent_0_Template, 1, 0, null, 2)(1, MyComponent_ng_container_1_Template, 2, 0, "ng-container", 2); | ||
} | ||
if (rf & 2) { | ||
$r3$.ɵɵproperty("ngIf", ctx.someFlag); | ||
$r3$.ɵɵadvance(1); | ||
$r3$.ɵɵproperty("ngIf", ctx.someFlag); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...liance/test_cases/r3_view_compiler_i18n/self-closing_i18n_instructions/styles.pipeline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
decls: 4, | ||
vars: 0, | ||
consts: () => { | ||
__i18nMsg__('Text #1', [], {}, {}) | ||
__i18nMsg__('Text #2', [], {}, {}) | ||
return [ | ||
$i18n_0$, | ||
$i18n_1$, | ||
[__AttributeMarker.Classes__, "myClass"], | ||
[__AttributeMarker.Styles__, "padding", "10px"] | ||
]; | ||
}, | ||
template: function MyComponent_Template(rf, ctx) { | ||
if (rf & 1) { | ||
$r3$.ɵɵelementStart(0, "span", 2); | ||
$r3$.ɵɵi18n(1, 0); | ||
$r3$.ɵɵelementEnd(); | ||
$r3$.ɵɵelementStart(2, "span", 3); | ||
$r3$.ɵɵi18n(3, 1); | ||
$r3$.ɵɵelementEnd(); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...est/compliance/test_cases/r3_view_compiler_template/template_with_structural_directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function MyComponent_0_ng_template_0_Template(rf, ctx) { | ||
if (rf & 1) { | ||
i0.ɵɵtext(0, "Content"); | ||
} | ||
} | ||
function MyComponent_0_Template(rf, ctx) { | ||
if (rf & 1) { | ||
i0.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 1, 0, "ng-template"); | ||
} | ||
} | ||
… | ||
decls: 1, | ||
vars: 1, | ||
consts: [[4, "ngIf"]], | ||
template: function MyComponent_Template(rf, ctx) { | ||
if (rf & 1) { | ||
i0.ɵɵtemplate(0, MyComponent_0_Template, 1, 0, null, 0); | ||
} | ||
if (rf & 2) { | ||
i0.ɵɵproperty("ngIf", true); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...est/compliance/test_cases/r3_view_compiler_template/template_with_structural_directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'my-component', | ||
standalone: true, | ||
template: ` | ||
<ng-template *ngIf="true">Content</ng-template> | ||
`, | ||
}) | ||
export class MyComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.