javascript - How to keep html_safe inside AngularJS variable string? -
{{member.content.length < 300 ? '' : "<a href='javascript:void(0)' onclick='show()'>..read more>></a>"}}</p>
output should like: ..read more>>
is trying achieve?
<a ng-if="member.content.length > 300" href="javascript:void(0)" onclick="show()"> ..read more>> </a>
you can use ng-if directive hide or show in angularjs. angular 2 uses *ngif="member.content.length > 300"
directive.
Comments
Post a Comment