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:
well yeah, logs correct thing.... must show right display right?
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
Post a Comment