协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
angular-tooling【开发与工程】Angular CLI usage, code generation, build configuration, and bundle optimization. Use for Angular CLI/build tasks; defer standalone webpack configuration and generic test-runner setup.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
ng generate component (or ng g c)--dry-run previews before write. --change-detection=OnPush sets CD at generation. skip-tests skips spec.ng generate — never create files manually.ng new my-app --style=scss --routing # Create project
ng g c features/user-profile # Generate component
ng g s services/auth # Generate service (providedIn: root)
ng g guard guards/auth # Generate functional guard
ng g interceptor interceptors/auth # Generate functional interceptor
ng g pipe pipes/truncate # Generate standalone pipe
--dry-run — Preview output without writing files. Always use --dry-run first for unfamiliar generators.skip-tests — Skips spec file generation.--flat — Skips subfolder creation.--change-detection=OnPush — Sets CD strategy on generation.--style=scss — Sets stylesheet format.ng serve --openng build -c production. Output goes to dist/my-app/browser/.ng add @angular/ssr then ng build (adds server/ output).ng test --code-coverage --watch=false. Coverage output goes to coverage/ directory.ng build -c production --stats-json
npx esbuild-visualizer --metadata dist/my-app/browser/stats.json --open
angular.json budgets — don't lower without understanding what's large.ng update — lists available updates.ng update @angular/core @angular/cli — runs official codemods.ng generate for consistency and proper registration.ng update --force: Fix peer dependency conflicts instead of skipping.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
Never use --force
angular.json
angular.json budgets
never create files manually
Additional task-grounded exact anchors: @angular/ssr