material
material copied to clipboard
Using $md-dialog.confirm without button
I have a confirm dialog that has OK and CANCEL buttons. I'm trying to display the confirm dialog on load. However, without a ng-click event to open the dialog, I can't seem to get it to work. The dialog will open, but the OK and CANCEL buttons do nothing because I haven't passed in an event to targetEvent.
Is there a way to use the $mdDialog.confirm without a ng-click event?
UPDATE: I was able to get this to work without the event when creating a CodePen example. I think the issue lies somewhere in the fact that this functionality is in an angular directive. Going to do more research to find out why the buttons aren't working.