Reputation: 321
I wanna add a component in SweetAlert popup(I'm using Angular 6). Is there any way? I tried this way but it's still no render:
Swal({
type: 'warning',
title: this.translate.instant('agents'),
text: this.translate.instant('agents_text'),
html: `<simple-table [data]="appointments"
[columns]="appointmentsCols">
</simple-table>`
});
Which 'simple-table' is a custom table that contains data items and appontments.
Upvotes: 0
Views: 687
Reputation: 575
SweetAlert's documentation says in the html configuration
"A HTML description for the modal. It can either be added to the object under the key "html" or passed as the second parameter of the function."
Your 'simple-table' is not a html tag.
Regards
Upvotes: 2