Hi.
I have a MySQL database connected to my App. When I display the content, I want :
- to transform URL in text in order to click on. (For now, the URL displayed is just text)
- to display carriage return
I tried to use “DomSanitizer” from Angular, but no success (may be I read the docs wrong)
What must I do ?
That’s my HTML code
<div id="msgOrigine">
<p>{{item.auteur}}</p>
<h3 style="margin: 0; padding-bottom: 0.5em">{{item.titre}}</h3>
{{item.contenu}}
</div>
And that’s my TS :
load() : void
{
this.http
.get('http://localhost:8888/recup-reponses-sujet.php?idSujet='+String(this.item.id))
.subscribe((data : any) =>
{
console.dir(data);
this.itemsBDD = data;
},
(error : any) =>
{
console.dir(error);
});
}
Thank you for your help