put new line in string to translate

前端 未结 3 1778
小蘑菇
小蘑菇 2021-02-19 05:24

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}}
         


        
3条回答
  •  后悔当初
    2021-02-19 06:05

    If you want

    for \n\n and
    for \n, here's my solution:

    Step 1: Do as I say in this comment

    Step 2: Chain your pipes likes this:

    More information about chaining pipes here: https://angular.io/guide/pipes#chaining-pipes

提交回复
热议问题