Filter for replace text in Angular Js

angular js

By using below filter we will replace the text in angular js

.filter('ReplaceBreak', function() {
  return function(input) {
    input = input || '';
    html = '';
    var br_arr = input.split('<br>');
    for(var i=0;i<br_arr.length;i++){
    	html += br_arr[i]+', ';
    html = html.substring(0, html.length - 2);
    html = html.replace(/,\s*$/, "");
    return html;




You might also like:

Check null values in JavaScript?

04-02-2019 JavaScript null check null value

Convert and download html to pdf without saving file

28-10-2018 node js convert html to pdf pdf download pdf without saving

Convert Time 24 hrs to 12 hrs format In javascript

12-03-2017 date javascript 12hrs convert

Filter for change Date Time format (MM-dd-yyyy HH:mm) in Angular Js

05-03-2017 mm-dd-yyyy HH:MM date formats angular js

How to remove last / value from url in javascript

27-02-2017 array javascript last value