0

Below is the 3 dimensional array returned from the API response which I need to show it up in the UI using angularjs.

"items": [[[12,13,14], [13,14,15]],[[13,14,15],[14,15,16]],[[14,15,16],[15,16,17]]]

For each and every element in the array, I have to bind these element to a ng-model of a textbox.

<input name="item" type="text" ng-model="???" placeholder="Enter a value" />

Thanks in advance

2 Answers 2

3

I had found the solution based on the suggestion by @karaxuna

<div ng-repeat="subItems in items">
    <div ng-repeat="subSubItems in subItems">
       <div ng-repeat="subSubSubItems in subSubItems">
          <input type="text" ng-model="subSubSubItems" />
       </div>
    </div>
</div>

Thanks

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

Comments

2

Try this way:

<div ng-repeat="subItems in items">
    <div ng-repeat="subSubItems in subItems">
        <input type="text" ng-model="subSubItems" ng-list />
    </div>
</div>

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.