fix(ivy): include ngProjectAs
into attributes array (#32784)
Prior to this commit, the `ngProjectAs` attribute was only included with a special flag and in a parsed format. As a result, projected node was missing `ngProjectAs` attribute as well as other attributes added after `ngProjectAs` one. This is problematic since app code might rely on the presence of `ngProjectAs` attribute (for example in CSS). This commit fixes the problem by including `ngProjectAs` into attributes array as a regular attribute and also makes sure that the parsed version of the `ngProjectAs` attribute with a special marker is added after regular attributes (thus we set them correctly at runtime). This change also aligns View Engine and Ivy behavior. PR Close #32784
This commit is contained in:
@ -1376,7 +1376,7 @@ describe('compiler compliance', () => {
|
||||
const SimpleComponentDefinition = `
|
||||
const $_c0$ = [[["", "title", ""]]];
|
||||
const $_c1$ = ["[title]"];
|
||||
const $_c2$ = [5, ["", "title", ""]];
|
||||
const $_c2$ = ["ngProjectAs", "[title]", 5, ["", "title", ""]];
|
||||
…
|
||||
MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyApp,
|
||||
@ -1428,7 +1428,7 @@ describe('compiler compliance', () => {
|
||||
const SimpleComponentDefinition = `
|
||||
const $_c0$ = [[["", "title", ""]]];
|
||||
const $_c1$ = ["[title]"];
|
||||
const $_c2$ = [5, ["", "title", ""]];
|
||||
const $_c2$ = ["ngProjectAs", "[title],[header]", 5, ["", "title", ""]];
|
||||
…
|
||||
MyApp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||
type: MyApp,
|
||||
|
Reference in New Issue
Block a user