This question is related to ngTemplateOutlet with dynamic value
Following this example, there is a @ViewChild('one') one:TemplateRef<any>;
for each template.
I'm doing a application which is essentially an eBook. Currently I have a <ng-template #pagexx>
for each page. Any way to avoid having the @ViewChild
for everypage? This will get quite tedious for a large set of pages.
Looking for a way that expression can be passed in from component.ts
and have the expression evaluate to page6
or page7
...
Thanks for any help.