Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am bring a data from a server which is an Array that hold a long and string value.The data i recieve is mentioned below

warehouseList: Array[2]
0: Array[2]0: 11: "Enterprise"
1: Array[2]0: 21: "800-BETHLEHEM"

How to print the names in the div.

<ng-repeat "items in warehouseList">
{{item[1}}

Please provide some idea. Thanks .

share|improve this question
    
Did you reference or copy warehouseList in your controller's $scope? – axelduch Sep 10 '14 at 6:32

if you have some object which stored in array for example

var arr = [{someKey:'value',someOtherKey:'otherValue'},{someKey:'value',someOtherKey:'otherValue'}] 

then you can access like this

<div ng-repeat "item in arr ">
    {{item.someKey}} 

</div>
share|improve this answer
    
No, its not working, i have tried the conventional or the usual way. its not working. – user2375298 Sep 10 '14 at 6:25
    
could you post your array ? – Narek Mamikonyan Sep 10 '14 at 6:29
    
i have posted it in my question . I initialise in the scope like this $scope.carrierWarehouseList:[{}], – user2375298 Sep 10 '14 at 6:39

Try this:

<div ng-repeat="item in warehouseList">
    {{item[1]}}
</div>
share|improve this answer
    
It's great.Thanks – Morteza Azizi Dec 28 '14 at 10:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.