I'm working with the Smart Admin Angular Version, When I want to use from notificationService I have a problem.
I cant handle pressed button in notificationService.smallBox.
My code in like bellow:
notificationExample5() {
this.notificationService.smallBox({
title: "Ding Dong!",
content: "Someone's at the door...shall one get it sir? <p class='text-align-right'><a href-void class='btn btn-primary btn-sm'>Yes</a> <a href-void class='btn btn-danger btn-sm'>No</a></p>",
color: "#296191",
//timeout: 8000,
icon: "fa fa-bell swing animated"
});
}
How I cant handle 'YES' or 'NO' button in Angular?
You can have multiple ways to achieve it.
try https://stackoverflow.com/a/43065100/8179245 already answered solution.
Or use this stackbliz created for you https://stackblitz.com/edit/angular-confirmation-dialog-1i8zgw?file=app/app.component.ts
App Component Ts
App Component HTML
Confirm Box TS
Confirm Box HTML
Confirm Box Service