13

How can I concatenate the below two statements. Both work by oneself.

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

<app-output [warnMessage]="'TEXT01' | translate"></app-output>

Now I would like to combine both. How can I achieve this? In example something like that:

<app-output [warnMessage]="myvalue | number:'1.0-1' + 'TEXT01' | translate"></app-output>
2
  • pipes can not be combined like that. As maximum you can use few pipes on one value Commented Aug 16, 2018 at 12:24
  • Is it possible to parmeterize strings? For example "My text %1" with %1 = "some value". Commented Aug 16, 2018 at 12:40

1 Answer 1

22

Try adding some brackets

<app-output [warnMessage]="(myvalue | number:'1.0-1')+('TEXT01' | translate)">
</app-output>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.