feat(ivy): resolve forwardRef() for queries (#25080)
@ContentChild[ren] and @ViewChild[ren] can contain a forwardRef() to a type. This commit allows ngtsc to unwrap the forward reference and deal with the node inside. It includes two modes of support for forward reference resolution - a foreign function resolver which understands deeply nested forward references in expressions that are being statically evaluated, and an unwrapForwardRef() function which deals only with top-level nodes. Both will be useful in the future, but for now only unwrapForwardRef() is used. PR Close #25080
This commit is contained in:

committed by
Igor Minar

parent
48d7205873
commit
f902b5ec59
@ -48,4 +48,8 @@ export class ChangeDetectorRef {}
|
||||
export class ElementRef {}
|
||||
export class Injector {}
|
||||
export class TemplateRef {}
|
||||
export class ViewContainerRef {}
|
||||
export class ViewContainerRef {}
|
||||
|
||||
export function forwardRef<T>(fn: () => T): T {
|
||||
return fn();
|
||||
}
|
||||
|
Reference in New Issue
Block a user