Skip to content

docs: warn against non-memoized function calls in templates in the angular-developer skill - #70168

Closed
RubenPari wants to merge 1 commit into
angular:mainfrom
RubenPari:docs/skill-avoid-function-calls-in-templates
Closed

RubenPari wants to merge 1 commit into
angular:mainfrom
RubenPari:docs/skill-avoid-function-calls-in-templates

Conversation

@RubenPari

Copy link
Copy Markdown

Summary

  • Addresses Angular official skills are calling functions in the templates #70132: multiple reports of AI coding agents (using this repo's angular-developer skill) generating templates that call plain methods directly inside @for/@if expressions, re-executing on every change-detection run.
  • Checked skills/dev-skills/angular-developer/SKILL.md and all references/*.md — no existing guidance covers this.
  • Added a short, balanced note to references/components.md after the @for section: recommend computed()/a pure pipe for non-trivial work, but don't ban function calls outright — as discussed on the issue, there's no maintainer consensus that plain calls are always wrong (fine for cheap/pure lookups), so the note reflects that instead of a hard rule.

Test plan

  • N/A — Markdown-only change to skill guidance; no automated tests apply. Reviewed the added text for accuracy against the issue discussion.

…gular-developer skill

Fixes #70132. AI coding agents using this skill were observed calling
plain methods directly inside @for/@if template expressions (e.g.
items(count) returning a fresh array every change-detection run),
which is wasteful when the computation isn't trivial. Nothing in the
skill's references previously called this out.

Add a short, non-absolute note recommending computed() or a pure pipe
for non-trivial work, while allowing plain calls for cheap/pure
lookups — there's no maintainer consensus on banning function calls in
templates outright.
@pullapprove
pullapprove Bot requested a review from kirjs August 12, 2026 20:58
@google-cla

google-cla Bot commented Aug 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@angular-robot angular-robot Bot added the area: docs Related to the documentation label Aug 12, 2026
@ngbot ngbot Bot added this to the Backlog milestone Aug 12, 2026
@JeanMeche

Copy link
Copy Markdown
Member

You didn't sign the CLA, we cannot proceed with this PR.

@JeanMeche JeanMeche closed this Aug 13, 2026
@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request 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.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Oct 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: docs Related to the documentation cla: no

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants