0
<tr ng-repeat="day in days" >

    <td> {{ day }} </td>
    <td> 
        <p ng-repeat="item in itemId.Items"> is: {{ item.day  }}</p>

In the code, item is a json object having Mon, Tue, Wed, etc as names. These names are supplied from day variable.

When I used item.day, angular is checking for day name in item object which is not available. What is required is day should be replaced with the specific name like item.Mon

Please advise.

0

1 Answer 1

2

replace

 <p ng-repeat="item in itemId.Items"> is: {{ item.day  }}

with

<p ng-repeat="item in itemId.Items"> is: {{ item[day]  }}

and your code should work.

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.