一键导入
angular-dialog
Generates an Angular dialog component extending BaseDialogComponent
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates an Angular dialog component extending BaseDialogComponent
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generates Angular animations for smooth UI transitions and interactions
Generates Angular components with best practices and patterns
Generates Angular directives for DOM manipulation and behavior enhancement
Generates Angular error boundary components for graceful error handling
Generates an Angular feature component (Standalone, OnPush)
Generates Angular reactive forms with validation, error handling, and state management
| name | angular-dialog |
| description | Generates an Angular dialog component extending BaseDialogComponent |
This skill helps you generate Angular dialog components that integrate with the project's dialog system by extending BaseDialogComponent.
When creating a new dialog, use this template:
{{name}}-dialog.ts)import { Component } from "@angular/core";
import { CommonModule } from "@angular/common";
import { FormsModule } from "@angular/forms";
import { BaseDialogComponent } from "../../../shared/components/base-dialog/base-dialog";
@Component({
selector: "app-{{name}}-dialog",
standalone: true,
imports: [CommonModule, FormsModule],
templateUrl: "./{{name}}-dialog.html",
styleUrls: ["../../../shared/components/base-dialog/base-dialog.css"], // Reuse base styles
})
export class {{Name}}DialogComponent extends BaseDialogComponent<{{ReturnType}}> {
title = "{{Dialog Title}}";
// Define model properties here
inputValue: string = "";
protected validate(): boolean {
// Return true if valid, false otherwise
return this.inputValue.length > 0;
}
protected getValue(): {{ReturnType}} {
// Return the value to be passed back to the caller
return this.inputValue;
}
}
{{name}}-dialog.html)<div class="dialog-overlay" *ngIf="visible()" (click)="onOverlayClick($event)">
<div class="dialog-content">
<div class="dialog-header">
<h2>{{ title }}</h2>
<button class="close-btn" (click)="cancel()">×</button>
</div>
<div class="dialog-body">
<!-- Content goes here -->
<div class="form-group">
<label>Input Label</label>
<input type="text" [(ngModel)]="inputValue" (keydown.enter)="submit()">
</div>
</div>
<div class="dialog-footer">
<button class="btn-secondary" (click)="cancel()">Cancel</button>
<button class="btn-primary" (click)="submit()">Confirm</button>
</div>
</div>
</div>
BaseDialogComponent<T>.validate() and getValue().visible() signal for visibility.base-dialog.css for consistent styling.(click)="onOverlayClick($event)" on the overlay.