angular2-notifications icon indicating copy to clipboard operation
angular2-notifications copied to clipboard

Html notification

Open Luvelnet opened this issue 2 years ago • 1 comments

I am trying to show a notification with html, but there is no way.

This is my code:

const htmlContent = this.sanitizer.bypassSecurityTrustHtml('<div>Nuevo intento de inicio de sesión desde la web</div><div><button (click)="accept()">Aceptar</button><button (click)="reject()">Rechazar</button></div>');

this.notificationsService.html({
          html: htmlContent, 
          type: 'info',
          override:
          {
          timeOut: 0,  
          showProgressBar: false,
          pauseOnHover: false,
          clickToClose: false
}});

And this is my result:

image

Can anybody help me?

Luvelnet avatar Oct 19 '23 12:10 Luvelnet

The value for html could also be an Angular TemplateRef. Is this a solution for your problem?

R-on avatar Dec 09 '23 20:12 R-on