Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Emojis in Angular html template

I am trying to insert emojis into my html code. On the plain html file it is working. And on my Angular component it shows blank squares.

Here is a code that I have used for both plain and Angular examples:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Example Page</title>
</head>
<body>
<p style="font-weight:600"> &#128566; &#x1F636;</p>
</body>
</html>

Output in plain: Plain html example
Output in Angular: Angular Example

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Huh so I see what you’re saying, actually adding interpolation in this case did make them render but I’m not entirely sure why they aren’t rendered without the interpolation wrapping around em:

{{'&#128566;'}}

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading