refactor(ivy): define new AttributeMarker.Template
marker (#29041)
This commit adds a new `AttributeMarker` type that will be used, in a future commit, to mark attributes as coming from an inline-template expansion, rather than the element that is being contained in the template. PR Close #29041
This commit is contained in:

committed by
Kara Erickson

parent
423ac01dcf
commit
e3a401d20c
@ -450,4 +450,29 @@ export const enum AttributeMarker {
|
||||
* ```
|
||||
*/
|
||||
Bindings = 3,
|
||||
|
||||
/**
|
||||
* Signals that the following attribute names were hoisted from an inline-template declaration.
|
||||
*
|
||||
* For example, given the following HTML:
|
||||
*
|
||||
* ```
|
||||
* <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
|
||||
* ```
|
||||
*
|
||||
* the generated code for the `template()` instruction would include:
|
||||
*
|
||||
* ```
|
||||
* ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
|
||||
* 'ngForTrackBy', 'let-value']
|
||||
* ```
|
||||
*
|
||||
* while the generated code for the `element()` instruction inside the template function would
|
||||
* include:
|
||||
*
|
||||
* ```
|
||||
* ['dirA', '', AttributeMarker.Bindings, 'dirB']
|
||||
* ```
|
||||
*/
|
||||
Template = 4,
|
||||
}
|
||||
|
Reference in New Issue
Block a user