Filter for replace text in Angular Js

filter
replace
angular js

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

angular.module('surgi')
.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:

Detect AdBlock with JavaScript in my browser

30-07-2017 AdBlock javascript detect

How To Get Your Blogs Posts Using Blogger API

30-07-2017 blogger api json php

How to insert bulk information into database in single query execution

18-03-2017 insert sql bulk database

Get next date from given date in javascript

06-03-2017 date javascript next date

Sample Validations in javascript

22-02-2017 validations javascript