https://stackblitz.com/edit/angular-wwwm2h
Steps to reproduce:
Autocomplete list is rendered on input click
Nothing is rendered
If you uncomment extra mat-option then list appears. I think ii's connected with the fact that autocomplete is unable to determine the number of options if they're coming from ng-template
The autocomplete won't open if it doesn't pick up any options usingContentChildren. Projecting them in via ngTemplateOutlet like this isn't supported.
@crisbeto I recently implemented component where used QueryList.changes to track dynamic elements in projected content. Why not use it here as well?
The problem isn't that the content is projected, it's that the content is actually an ng-container which creates the items through a TemplateRef. This case won't be picked up by the QueryList.
so, is it a general Angular problem? Maybe we can address it to Angular team?
It's definitely a framework limitation, but I'm not sure that it's a bug since this is the way it has always worked.
ok, I see. Thanks for explanation
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._