2
ostream
17d

Angular Material dialog's way of having input and output is bad and the people who designed it should feel bad. It plays horribly with NGRX and a dialog isn't a goddamn function

Comments
  • 1
    But it looks so yummmyyy
  • 0
    Ngrx is bad, the god object state machine registry as pseudo cqrs is a react-centric easy button. Just use rxjs state machines and a service.

    It's pretty trivial to wire up a service that will take data and a completion callback as a single launch signature and be usable everywhere it's injected. By default the modal instance supplies an afterAllClosed stream that gives you the data result of the modal, and encapsulates any errors from the modal using the standard observable mechanisms.

    https://material.angular.io/compone...
  • 0
    @SortOfTested what if I don't have a data result and have to implement some interactions INSIDE the dialog?

    I would have a way easier time to only have an 'open/close' boolean and implementing those interactions myself. Hell, at the end I would have a way easier time using a mere CSS library to implement material instead of this gazplant bullshit.
Add Comment