I am using Angular for front end, and node for back end. I am getting the data from a mySql db, where I have manually stored it in text format but with HTML tags on it i.e:
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
The data is currently in JSON format i.e:
{
"data": [
{
"id": 1,
"sort_order": 0,
"content_type": "main_message",
"heading": "Welcome to our site ",
"content": "<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>",
"page_name": "home",
"author_id": "abhatti",
"date_created": "2017-03-13T15:12:00.000Z",
"date_modified": "2017-03-13T15:12:00.000Z",
"modified_by": "abhatti"
},
{
"id": 2,
"sort_order": 0,
"content_type": "main_body_content",
"heading": "Announcements",
"content": "",
"page_name": "home",
"author_id": "Robert",
"date_created": "2016-12-31T17:00:00.000Z",
"date_modified": "2017-03-11T07:08:00.000Z",
"modified_by": "Danny"
},
when I put the data in the table , I want the table to show the data in HTML format , but it shows in raw format with all the HTML tags visible on the page like this
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
but I want something like this
- item1
- item2
- item3
How can I convert the data properly so it is read by the browser as HTML? Right now it is put in as a string.