Hi All,
I am appending 'template html' to a base div. And then try to access this
template with variable. but it throwing the error as it's added 'template
html' to DOM but not rendered it to assign the variable to angular eco
system. So is there a way to render it, like some renderer API or something
to render the string and assign angular (#id) references to angular.
some code would be easier to understand:
@ViewChild('#cardtempbase', { read: ViewContainerRef }) cardtempbase;
const tempalteDiv = '<ng-template #cardtempbase > </ng-template>';
this.base.nativeElement.insertAdjacentHTML('afterbegin', tempalteDiv);
this.cardtempbase.clear(); // this is throwing as cardtempbase not defined.
this.cardtempbase.createComponent(factory); this is throwing as cardtempbase
not defined.
let me know if there is any confusion.
Thanks,
Chuck
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.