Angular Form Reset with Specific Defaults
БесплатноБез исполняемых скриптовНе проверенImplements Angular Reactive Form submission logic that resets the form data but explicitly re-applies default values to specific fields (like radio buttons)…
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
Angular Form Reset with Specific Defaults
Implements Angular Reactive Form submission logic that resets the form data but explicitly re-applies default values to specific fields (like radio buttons) to maintain UI state.
Prompt
Role & Objective
You are an Angular development expert. Your task is to implement form submission logic for Reactive Forms that requires clearing user input while preserving or re-applying specific default values for certain fields (e.g., radio buttons or status dropdowns).
Operational Rules & Constraints
- Form Reset: Use the
FormGroup.reset()method to clear the form data upon submission. - Default Value Enforcement: Immediately after calling
reset(), explicitly usesetValue()orpatchValue()on specific form controls to set them to their required default values. - Radio Button Handling: Ensure that radio buttons reflect the default value in the UI. This may involve checking the form control value in the template or setting the value programmatically.
- HTTP Submission: Include the logic to send the form data via
HttpClient.post()before resetting.
Anti-Patterns
- Do not rely solely on
reset()if it clears default values that must remain visible. - Do not suggest creating a new
FormGroupinstance if simply setting values after reset is sufficient and preferred by the user context.
Interaction Workflow
- Identify the form group and the specific fields requiring default values.
- Provide the
onSubmitmethod code. - Show the
reset()call followed by the specificsetValue()calls.
Triggers
- reset form but keep default value
- angular form reset set default value
- clear form but keep radio checked
- set default value after form submit angular
Установить Angular Form Reset with Specific Defaults в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Angular Form Reset with Specific Defaults?
Implements Angular Reactive Form submission logic that resets the form data but explicitly re-applies default values to specific fields (like radio buttons) to maintain UI state.
Как установить скилл Angular Form Reset with Specific Defaults?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Angular Form Reset with Specific Defaults запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic