I created a filter in angular 1 and have some questions:
I have an string like this:
**StackExchange** is a website...
and the desired outcome would be:
<span class="title">StackExchange</span> is a website...
my filter looks like this:
.filter('makeSpan', function() {
return function(input, all) {
return (!!input) ? input.replace(/[*]{2}/, '<span class="title">') : '';
}
});
When Applying this filter I get StackExchange** is a website... My question is how can I do so I can target the other 2 **. Thanks.