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:

How to convert html to pdf in Node js

12-03-2017 pdf convert html node js

How to get current date and time (yyyy-mm-dd H:i:s) using javascript

09-03-2017 javascript date time

Using slice remove last two characters from given string

07-03-2017 slice remove

How to get drop down value when drop down change using javascript

27-02-2017 onchange events dropdown javascript functions

Email validation regular expression in javascript

22-02-2017 email validation regex