‹ 首页

angular

@clawic · 收录于 昨天 · 上游提交 2 天前

Build reliable Angular apps avoiding RxJS leaks, change detection traps, and DI pitfalls.

适合你,如果你正在开发Angular应用并想避免性能问题。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add clawic/skills/angular
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- clawic/skills/angular
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify clawic/skills/angular
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
14GitHub stars
~343最小装载
~1.1K含声明引用
~1.2K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 f825206 · 表述以原文为准
它做什么

Claude会提供Angular开发的专业建议,涵盖组件架构、RxJS模式、变更检测、依赖注入、路由和表单,并帮助你避免常见陷阱,如RxJS内存泄漏和变更检测问题。

什么时候触发

当用户询问关于Angular组件架构、RxJS、变更检测、依赖注入、路由或表单等方面的问题时触发。

装好后可以这样说
Claude会解释async pipe的用法。
Claude会提示创建新引用。
技能原文 SKILL.md作者撰写 · MIT · f825206
When to Use

User needs Angular expertise — component architecture, RxJS patterns, change detection, dependency injection, routing, and forms.

Quick Reference

| Topic | File | |-------|------| | Components & change detection | components.md | | RxJS & subscriptions | rxjs.md | | Forms & validation | forms.md | | Dependency injection | di.md | | Routing & guards | routing.md | | HTTP & interceptors | http.md |

Common Mistakes
  • OnPush with mutated objects won't trigger change detection — always create new reference: {...obj} or [...arr]
  • @ViewChild is undefined in constructor/ngOnInit — access in ngAfterViewInit or later
  • *ngFor without trackBy re-renders entire list on any change — add trackBy returning stable ID
  • Manual subscribe() without unsubscribe leaks memory — use async pipe, takeUntilDestroyed(), or unsubscribe in ngOnDestroy
  • HttpClient returns cold Observable — each subscribe() fires new HTTP request
  • setTimeout/setInterval outside NgZone — change detection won't run, use NgZone.run() or signals
  • Circular DI dependency crashes app — use forwardRef() or restructure services
  • ElementRef.nativeElement direct DOM access breaks SSR — use Renderer2 or @defer
  • Route params via snapshot miss navigation changes — use paramMap Observable for same-component navigation
  • setValue() on FormGroup requires ALL fields — use patchValue() for partial updates
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。