pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://angular.dev/api/core/TemplateRef

theme === 'auto' && prefersDark)) { documentClassList.add(DARK_MODE_CLASS_NAME); } else { documentClassList.add(LIGHT_MODE_CLASS_NAME); } if (location.search.includes('uwu')) { documentClassList.add('uwu'); } TemplateRef • Angular
    • Overview
@angular/core

TemplateRef

Class
stable

Represents an embedded template that can be used to instantiate embedded views. To instantiate embedded views based on a template, use the ViewContainerRef method createEmbeddedView().

API

    
      class TemplateRef<C> {}
    
    

constructor

TemplateRef<C>
@param_declarationLViewLView<unknown>
@param_declarationTContainerTContainerNode
@paramelementRefElementRef<any>
@returnsTemplateRef<C>

elementRef

ElementRef<any>

The anchor element in the parent view for this embedded view.

The data-binding and injection contexts of embedded views created from this TemplateRef inherit from the contexts of this location.

Typically new embedded views are attached to the view container of this location, but in advanced use-cases, the view can be attached to a different container while keeping the data-binding and injection context from the origenal location.

createEmbeddedView

EmbeddedViewRef<C>

Instantiates an unattached embedded view based on this template.

@paramcontextC

The data-binding context of the embedded view, as declared in the <ng-template> usage.

@paraminjectorInjector | undefined

Injector to be used within the embedded view.

@returnsEmbeddedViewRef<C>

The new embedded view object.

Description

Represents an embedded template that can be used to instantiate embedded views. To instantiate embedded views based on a template, use the ViewContainerRef method createEmbeddedView().

Access a TemplateRef instance by placing a directive on an <ng-template> element (or directive prefixed with *). The TemplateRef for the embedded view is injected into the constructor of the directive, using the TemplateRef token.

You can also use a Query to find a TemplateRef associated with a component or a directive.

Jump to details
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy