question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poor <ng-template> aio docs

See original GitHub issue

Docs 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 and ngTemplateOutlet
  • 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

Screenshot at 2021-06-27 19-37-00

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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dario-piotrowiczcommented, Jun 27, 2021

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 🙂

0reactions
angular-automatic-lock-bot[bot]commented, Aug 12, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docs(aio): Template reference var scope guidance doesn't ...
According to the docs: https://angular.io/guide/template-syntax#template-reference-variables--var-. You can refer to a template reference ...
Read more >
Angular documentation style guide
This style guide covers the standards for writing Angular documentation on angular.io. These standards ensure consistency in writing style, ...
Read more >
How to fix the ng-template displaying before the actual result
Problem is your fakeRequest returns result after a delay and till then on ui it displays the already existing result or not found...
Read more >
Everything you need to know about ng-template, ng-content ...
As the name suggests the <ng-template> is a template element that Angular uses with structural directives ( *ngIf , *ngFor , [ngSwitch] and ......
Read more >
Performance Tuning Guide Red Hat Enterprise Linux 7
It also documents performance-related upgrades in Red Hat Enterprise Linux 7. ... The top tool, provided by the procps-ng package, gives a dynamic...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found