javascript - Rendering in MarkedJS -


i have problem dosent render code odd reason, , ill show code. here code controller(angularjs) :

$scope.$watch('creatorvalue', function(current, original) {           var htmlval = document.getelementbyid('creatorvalue').innerhtml;           console.log(original);            htmlval = marked(original); }); 

and here minimal html:

<div class="topic-sentence">         <p class="topic-text" id="creatorvalue">{{creatorvalue}}</p> </div>  

well can see logged original value , came correct result: enter image description here

well yeah, logs correct thing.... must show right display right? enter image description here

nope can see above, code in 1 line, , there nothing "marked". if guys want see more code, let me know in comments below. appreciated.

here, have not put marked content dom. should work, please try.

$scope.$watch('creatorvalue', function(current, original) {               document.getelementbyid('creatorvalue').innerhtml = marked(original); }); 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -