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

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -