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

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -