Questions tagged [ngtemplateoutlet]
18 questions
7
votes
1 answer
How do I use @ViewChild with an external ng-template (Angular 11)
THE PROBLEM
So I have two Angular components, a parent and a child. The parent passes a custom template to the child component, which then hydrates the template with its own data using ngTemplateOutlet.
This works well for the most part.…

treycrossley
- 143
- 1
- 8
4
votes
1 answer
ngRouterOutlet and component lifecycle - problem with rendering custom template
Introduction
I have created a shared table component that uses Angular Material to render a table based on data and column configurations. The component has default templates for string and number data types, but users should be able to provide…

akkonrad
- 1,043
- 1
- 10
- 25
4
votes
3 answers
Can't bind to 'ngTemplateOutlet' since it isn't a known property of 'ng-container'
It seem to be a problem of the '@angular/common' module and the ivy compiler? Any ideas?
Deleting node_modules and updating angular does not have any success.
World!…

Marc Reitec
- 69
- 1
- 5
3
votes
2 answers
ViewChild from ngTemplateOutlet coming from parent component
I have a child component which accept a TemplateRef as an @Input and displays it through ngTemplateOutlet. How can I use @ViewChild/@ViewChildren to retrieve components inside the template ?
If the template is declared in the same component that…

MHogge
- 5,408
- 15
- 61
- 104
1
vote
1 answer
in Angular inside ngtemplateoutlet unable to access formcontrol of form control name
i create stackblitz project
https://stackblitz.com/edit/new-project-jksckf?file=src%2Fapp%2Fform-field-overview-example.ts,src%2Fapp%2Fform-field-overview-example.html
If i pass formcontrolname to ng-template using ngtemplateoutlet it is showing…

Johnson Daniel
- 11
- 1
- 1
1
vote
2 answers
Adding Dynamic Content inside
Hello World
Good Morning

Ramya Balasubramanian
- 11
- 1
- 3
1
vote
1 answer
Reusable angular 11 template
I have 2 mat-tabs which each have a table in them, with the same data layout, just a different data source.
<-- one data source
…
joke | date | id |
---|