Blame view

public/js/filters/nl2brFltr.js 318 Bytes
f0a7357d   Geoffrey PREUD'HOMME   Gestion des retou...
1
2
3
4
5
6
7
  angular.module('nl2br', [])
      .filter('nl2br', function ($sce) { // From http://stackoverflow.com/questions/15449325/how-can-i-preserve-new-lines-in-an-angular-partial#15449549
          return function(text) {
              text = text.replace(/\n/g, '<br />');
              return $sce.trustAsHtml(text);
          }
  });