material icon indicating copy to clipboard operation
material copied to clipboard

Using $md-dialog.confirm without button

Open BobKlaas opened this issue 10 years ago • 0 comments

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.

BobKlaas avatar Dec 05 '15 00:12 BobKlaas