0

i want to set value for input of component that contain string and value comes from server.what should i do?

I’ve tried something like this

<otk-title-value [title]="`پرداخت به ازای ${detailData?.stayingTime} شب`">
                        </otk-title-value>

2 Answers 2

3

You can also try:

<otk-title-value title="پرداخت به ازای{{detailData?.stayingTime}} شب"></otk-title-value>

Demo

Sign up to request clarification or add additional context in comments.

Comments

0

You can do it like this:

<otk-title-value [title]="'پرداخت به ازای' + detailData?.stayingTime + 'شب'"></otk-title-value>

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.