angular / angular/components

Dialog with inline Template

Offen
#10,459 14 Kommentare 12 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: material/dialog feature P4
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

#### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem verlinkten StackBlitz-Beispiel, insbesondere mit app/app.component.html, und vergleiche die angeforderte Inline-Verwendung von mat-dialog mit der vorhandenen Material-Dialog-Dokumentation und dem Quellcode. Ermittle, ob projizierter Inhalt und mat-dialog-close unterstützt werden können, und definiere anschließend die für das Öffnen des Dialogs und die Rückgabe des ausgewählten Ergebnisses erforderliche API und die Tests.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.