3

I have the following bit of text as a value in a key - value pair:

`${site.name} was added successfully.<br>
The URL for this site is
<a href="{{ 'domain' | i18n: {url: domain} }}" target="_blank">
{{ 'domain' | i18n: {url: domain} }}</a>.`,

It seems like because I am mixing template literals and and Angular expressions, I am unable to get the expression to print out the value, and it instead just prints: {{ 'domain' | i18n: {url: domain} }}

Any ideas on how to combine both?

Thanks

User 5842
  • 2,849
  • 7
  • 33
  • 51

1 Answers1

0

You could do this:

[
  `${site.name} was added successfully.<br>`,
  `The URL for this site is`,
  `<a href="`,
  "{{ 'domain' | i18n: {url: domain} }}",
  '" target="_blank">',
  "{{ 'domain' | i18n: {url: domain} }}</a>"`
].join('');
SHRUTHI BHARADWAJ
  • 587
  • 2
  • 5
  • 15