Hi I'm new to Angualr JS and I want to filter every returned twitter text if it contains a word with hashtag then make that word a link.
e.g
returned twitter text is
"The quick brown #fox jumps over the lazy #dog" then make the returned text as
"The quick brown <a href="page.link">#fox</a> jumps over the lazy <a href="page.link">#dog</a>
HTML Code
<ul class="list-unstyled">
<li ng-repeat="tweet in tweets" class="striped">
<p ng-bind-html="tweet.text | filter:hashtag"></p>
</li>
</ul>
JS code
app.filter('hashtag', function(){
});
/#\w+/gshould get you started. Specifically, you'll want something liketweetText.replace(/#\w+/g, '<a href="page.link">$&</a>')- Phil