angular-modal-patterns

Implements Bootstrap modal dialogs in ASP.NET Zero Angular using AppBsModalDirective and signals.

Updated May 22, 2026
One-click install
npx skills add https://github.com/shakesoft/timekeeper --skill angular-modal-patterns-shakesoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: angular-modal-patterns
Source: https://github.com/shakesoft/timekeeper/tree/main/.cursor/skills/angular-modal-patterns
Command: npx skills add https://github.com/shakesoft/timekeeper --skill angular-modal-patterns-shakesoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building create/edit modal dialogs in ASP.NET Zero Angular projects involves many conventions—AppBsModalDirective, signal-based state, Luxon DateTime handling, and parent-child communication—that are easy to get wrong or inconsistent across components. ## Core Features & Use Cases - Standardized Modal Pattern: Provides a complete component and template structure using AppBsModalDirective, signal-based state (active, saving, entity), and output-based save events. - Luxon DateTime Handling: Shows correct binding of NSwag-generated Luxon DateTime fields to date inputs, avoiding TS2769 errors from misusing Angular's DatePipe. - Use Case: When adding a new entity to an ASP.NET Zero Angular admin panel, use this pattern to scaffold a create-or-edit modal with proper backdrop config, focus management, busy-button state, and parent component integration. ## Quick Start Create a create-or-edit modal component for my Product entity following the ASP.NET Zero Angular modal pattern with signal-based state and AppBsModalDirective.

Frequently Asked Questions about angular-modal-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a modal dialog in ASP.NET Zero Angular?▼

Create a component extending AppComponentBase that uses AppBsModalDirective with a viewChild reference to ModalDirective. Manage state with signals for active, saving, and the entity DTO, then expose show() and close() methods for the parent component.

How to bind Luxon DateTime to an Angular date input?▼

Bind the input with [ngModel]="dto.dateField?.toISODate()" and convert the string back using DateTime.fromISO(value) in the change handler. Do not use Angular's date pipe with Luxon DateTime values, as it causes a TS2769 type error.

Should I use bsModal or AppBsModalDirective in ASP.NET Zero?▼

Use AppBsModalDirective (appBsModal) rather than plain ngx-bootstrap bsModal. It is the ASP.NET Zero convention, paired with a template reference like #createOrEditModal="bs-modal" and a static backdrop configuration.

Why does the Angular date pipe fail with NSwag DateTime fields?▼

NSwag generates DateTime fields as Luxon DateTime objects, not native JavaScript Date objects, so Angular's DatePipe rejects them with a TS2769 error. Use the LuxonFormatPipe or .toLocaleString() for display instead.

How does a parent component open and refresh from a modal?▼

Declare the modal in the parent template and bind its modalSave output to a refresh method like getProducts(). In the parent class, use viewChild to get the modal component and call show() or show(id) for create and edit actions.