I want to kind of use innerHTML on the value which I recieve from backend and bind it to the matInput.
Is this possible?
I want to kind of use innerHTML on the value which I recieve from backend and bind it to the matInput.
Is this possible?
Angular binding protects you from XSS by escaping html/script in text. You need to DomSanitizer to return safe html for binding. Checkout it out https://angular.io/api/platform-browser/DomSanitizer
Hello
', 'text/html'); console.log(doc.documentElement.innerText);` – JB Nizet Nov 24 '19 at 10:40