how I can pass html text to angularjs template -
how can pass html text angular js template.
for eample below template want pass task.data "this task xyz status of task"
now on web page can see html tags . please me fix this.
<script type="text/ng-template" id="default.tooltip.tmpl.html"> <div class="gantt-task-info" ng-style="css"> <div class="gantt-task-info-content"> {{ task.data }}</br> {{ task.link1 }} </br> <small> {{ task.ismilestone === true && (task.from | date:'mmm d, hh:mm') || (task.from | date:'mmm d, hh:mm') + ' - ' + (task.to | date:'mmm d, hh:mm') }} </small> </div> </div> </script>
you can solve problem using ng-bind-html directive
see below reference code
<div class="gantt-task-info-content"> <p ng-bind-html="task.data"></p></br> <p ng-bind-html="task.link1"></p></br>
hope help
Comments
Post a Comment