I\'m using ngx-translate.
How can I put a line break in a string to translate ?
In my template I have :
{{\'STRING_TO_TRANSLATE\' | translate}}
It works! But instead of
{{'STRING_TO_TRANSLATE' | translate}}
You should do
should work just fine, but in other cases you may need some additional 'safe html pipe', i.e:
s
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
@Pipe({name: 'mySafeHtmlPipe'})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {
}
public transform(htmlContent) {
return this.sanitizer.bypassSecurityTrustHtml(htmlContent);
}
}