[Dialog] Add a directive to simplify dialog interaction
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia leggendo l’implementazione proposta in src/lib/dialog/dialog-open-directive.ts e rivedendo i due esempi di utilizzo collegati. Confronta questo approccio con le API dei dialog esistenti e determina l’ambito necessario per la directive, la configurazione, il template, il binding e la documentazione. Il lavoro è considerato completato quando sono stati concordati un’implementazione ed esempi documentati, ma l’issue non identifica né i test né un design definito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100