angular / angular/components

[Dialog] Add a directive to simplify dialog interaction

Abierto
#14,483 6 comentarios 2 reacciones 0 asignados Ver en GitHub
area: material/dialog feature P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### Please describe the feature you would like to request.
A directive that accepts a TemplateRef and a dialog configuration object
When the button this directive is placed on is clicked a dialog containing that Template is created

#### What is the use-case or motivation for this proposal?
Allows users to interact with dialogs like other components - through their markup bindings. No need to use poorly understood _entry components_. Dialog templates are part of the component template; input and output bindings are fully accessible (as are pipes.)

The existing programmatic only approach feels like there is a lot of ceremony over creating dialogs - many of which would otherwise be simple components.

#### Is there anything else we should know?
I've stubbed out what the implementation might look like here. I've used a version of this in production for over a year now. I've also included 2 examples of usage.
https://github.com/adammedford/material2/blob/open-dialog-directive/src/lib/dialog/dialog-open-directive.ts

I will submit a PR if there is interest in this; this version is to just convey what I'm talking about. I didn't want to go through the effort of a full implementation and docs if nobody cares to use it.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza leyendo la implementación propuesta en src/lib/dialog/dialog-open-directive.ts y revisando los dos ejemplos de uso enlazados. Compara ese enfoque con las APIs de diálogo existentes y determina el alcance necesario para la directiva, la configuración, la plantilla, el binding y la documentación. Se considera completado cuando haya una implementación acordada y ejemplos documentados, pero el issue no identifica pruebas ni un diseño establecido.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.