0

I am working on dynamically creating the tiles like UI for showing the metrics. i want to show some color dynamically based on the id. i need to append "_flag" with the dynamic value(symptom.symId = S1). my code is given below.

<div data-bind="foreach: {data:symptomArray , as: 'symptom'}">
<div data-bind="attr:{ id : symptom.symId}"> </div> 
</div>

Please help me

1
  • 2
    Your question is quite unclear. Where do you want to append this _flag? Commented Aug 21, 2014 at 8:43

1 Answer 1

1

If I understand your question correctly, then you want to do:

attr: { id: sympton.symId + '_flag' }

or if symId is observable, then:

attr: { id: sympton.symId() + '_flag' }
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.