ng_html_compile
ng_html_compile copied to clipboard
ng-html-compile issues with rendering HTML
I am trying to do the following - using AngularJS and HTML in Visual Studio 2019.
1)In HTML page - DIV - with ID = Test. Assign ng-html-compile="htmlTemplate" to the DIV. 2)Save the DIV to SQLServerDatabase. By using
var obj = document.getElementById('Test').innerHTML; // Saves to the database.
3)Retrieve obj saved to the database and assign its value to htmlTemplate
4)Doesn't seem to work correctly. In fact for other DIVs present inside Test - I see elements rendered twice. See below for more details - What could be the cause of the issues?