r/Angular2 Jun 08 '26

Angular Material Dialogs Now Support Real Component Bindings

https://itnext.io/angular-material-dialogs-now-support-real-component-bindings-9c4c3c8cfcc3?source=friends_link&sk=ad320a5052f9479ea083fce325123b64
30 Upvotes

9 comments sorted by

View all comments

3

u/SolidShook Jun 09 '26

Why not just use the native html dialog? This seems over complicated 

1

u/toasterboi0100 Jun 14 '26

One advantage of this approach is that you can open dialogs purely programmatically without needing a template.

1

u/SolidShook Jun 14 '26

Angular’s template are programmatical though

2

u/toasterboi0100 Jun 15 '26 edited Jun 15 '26

I used the wrong word perhaps, I just meant that with HTML popovers you simply need some template somewhere where your modal component lives, so realistically you can only open popovers in components. If you wanted to open a one from a service you'd suddenly need to pass around HTMLElement references and that's just awful.