Poor <ng-template> aio docs
See original GitHub issueDocs or angular.io Bug Report
Description
I stumbled across the aio docs for the ng-template
element they are quite underwhelming, I understand that it is not the most important element in Angular but it does have some relevance and I’d imagine there would be more to say about it
For example:
- how it is used in structural directives
- relation with
TemplateRef
andngTemplateOutlet
- its context (more on this below)
- how it can be assigned a template variable so that it can be used in other parts of the template or by
viewChild
(Please let me know if there are other aspects that could be mentioned)
Also personally I find the current wording a bit confusing:
that doesn’t render anything by default
this to me sort of sounds like you could get the ng-template
to render something
(maybe “that doesn’t get rendered by default” would be better?)
What’s the affected URL?**
https://angular.io/api/core/ng-template
Screenshot
Extra
The templateRef
’s createEmbeddedView
docs (link) include the following:
The data-binding context of the embedded view, as declared in the <ng-template> usage.
Suggesting that the ng-template
docs are supposed to contain something about the template’s context (but they don’t)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (8 by maintainers)
Top GitHub Comments
I just wanted to mention that if this issue gets approved and I would be allowed to, I would love to possible be assigned to it and come up with the content for the
ng-template
docs 🙂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.