我想將HTML中的{{post.title}}
的值更改爲超鏈接URL。AngularJS將{{post.title}}更改爲超鏈接
可能嗎?
<div ng-repeat="post in posts">
<h2>
{{post.title}}
<a ng-click="editPost(post._id)" class="pull-right"><span class="glyphicon glyphicon-pencil"></span></a>
<a ng-click="deletePost(post._id)" class="pull-right"><span class = "glyphicon glyphicon-remove"></span></a>
</h2>
<em>{{post.posted}}</em>
<p>{{post.body}}</p>
</div>
謝謝@sajeetharan – gymcode
@gymcode歡迎您 – Sajeetharan