angular / angular/components

Dialog with inline Template

未关闭
#10,459 14 条评论 12 个 reaction 已指派 0 人 在 GitHub 查看
area: material/dialog feature P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Bug, feature request, or proposal:
feature request

#### What is the expected behavior?
I'd like to use something like this (just like `mat-menu`):
```
Open it

Dialog Title



Content


Cancel
Confirm

```

#### What is the current behavior?
Doesn't exist as fat as I have seen in the docs and source code.

#### What are the steps to reproduce?
I've created a small component which demonstrates what I'm looking for:
https://stackblitz.com/edit/angular-material2-issue-tp5aej?file=app%2Fapp.component.html
(I didn't get `mat-dialog-close` working with the projection, though I chose to just add a method to my dialog component)

#### What is the use-case or motivation for changing an existing behavior?
There are many use cases where I just want a very simple dialog, and don't want to write 30 lines of code.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6 beta
Material 6 beta

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 示例开始,尤其是 app/app.component.html,并将所请求的 mat-dialog 内联用法与现有的 Material dialog 文档和源代码进行比较。确定是否可以支持投影内容和 mat-dialog-close,然后定义打开对话框并返回所选结果所需的 API 和测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。