·angular-20-control-flow
</>

angular-20-control-flow

7spade/black-tortoise

Angular 20 内置控制流语法(@if、@for、@switch、@defer)用于现代模板编程。在编写具有条件渲染、循环、switch 语句或延迟加载组件的模板时使用。使用新的块语法替换 *ngIf、*ngFor、*ngSwitch,以获得更好的性能和类型安全性。

6安装·0热度·@7spade

安装

$npx skills add https://github.com/7spade/black-tortoise --skill angular-20-control-flow

SKILL.md

Purpose This skill provides comprehensive guidance on Angular 20's built-in control flow syntax, which introduces new template syntax (@if, @for, @switch, @defer) that replaces structural directives with better performance, type safety, and developer experience.

| Syntax error with @ blocks | Ensure Angular 20+ and update compiler | | @for without track error | Always add track expression to @for | | @defer not lazy loading | Check bundle config and verify component is in separate chunk | | Type errors with @if | Use as alias for type narrowing |

| @empty not showing | Ensure collection signal returns empty array, not undefined |

Angular 20 内置控制流语法(@if、@for、@switch、@defer)用于现代模板编程。在编写具有条件渲染、循环、switch 语句或延迟加载组件的模板时使用。使用新的块语法替换 *ngIf、*ngFor、*ngSwitch,以获得更好的性能和类型安全性。 来源:7spade/black-tortoise。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/7spade/black-tortoise --skill angular-20-control-flow
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 angular-20-control-flow?

Angular 20 内置控制流语法(@if、@for、@switch、@defer)用于现代模板编程。在编写具有条件渲染、循环、switch 语句或延迟加载组件的模板时使用。使用新的块语法替换 *ngIf、*ngFor、*ngSwitch,以获得更好的性能和类型安全性。 来源:7spade/black-tortoise。

如何安装 angular-20-control-flow?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/7spade/black-tortoise --skill angular-20-control-flow 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/7spade/black-tortoise