代码之家  ›  专栏  ›  技术社区  ›  surfspider

属性绑定连接字符串角度

  •  0
  • surfspider  · 技术社区  · 6 年前

    我如何连接下面的两个语句。都是自己干的。

    <app-output [warnMessage]="myvalue | number:'1.0-1'"></app-output>
    
    <app-output [warnMessage]="'TEXT01' | translate"></app-output>
    

    现在我想把两者结合起来。我怎样才能做到这一点?例如:

    <app-output [warnMessage]="myvalue | number:'1.0-1' + 'TEXT01' | translate"></app-output>
    
    1 回复  |  直到 6 年前
        1
  •  11
  •   nsndvd    6 年前

    尝试添加一些括号

    <app-output [warnMessage]="(myvalue | number:'1.0-1')+('TEXT01' | translate)">
    </app-output>