In my code, I have a simple object retrieved like this:
getSelectedRecipients(event) {
this.aliasesService.getRecipients(event.nr)
.subscribe(
res => {
this.recipients = res;
this.isVisible = true;
},
err => console.error(err)
);
}
The output of
this.recipientsis:
{
recipients:
"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="741b1a1134101b19151d1a5a171b19">[email protected]</a>,↵
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a5d1d2cae5c1cac8c4cccb8bc6cac8">[email protected]</a>,↵
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="50243822353510343f3d31393e7e333f3d">[email protected]</a>,↵
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cea8a1bbbc8eaaa1a3afa7a0e0ada1a3">[email protected]</a>
"}
I now need to display this data in a table. Currently, it looks like this:
<td id="recipients">
{{recipients.recipients }}
</td>
Resulting in:
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="deb1b0bb9ebab1b3bfb7b0f0bdb1b3">[email protected]</a>, <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="760201193612191b171f185815191b">[email protected]</a> ... <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="63050c161123070c0e020a0d4d000c0e">[email protected]</a> [button]
However, I want the displayed format to be:
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="acc3c2c9ecc8c3c1cdc5c282cfc3c1">[email protected]</a> [button]
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4430332b04202b29252d2a6a272b29">[email protected]</a> [button]
.
.
.
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8cec7dddae8ccc7c5c9c1c686cbc7c5">[email protected]</a> [button]
How can I achieve this formatting? I need it for the next step which involves allowing the user to delete a specific recipient, such as [email protected], instead of all recipients at once.