Tutorialsplane

AngularJS Arrays


AngularJS Arrays : AngularJS arrays are same as the javaScript arrays. You can perform operation same as the javaScript arrays.

AngularJS Arrays simple Example using Expressions

You can access array elements same as javaScript.

<div ng-app="" ng-init="myArr=['First Item','Second Item']">

    <p> {{myArr[0] + " , " +myArr[1]}}</p>

</div>

Example 1




    



<div ng-app="" ng-init="myArr=['First Item','Second Item']">

    <p>Hi {{myArr[0] + " , " +myArr[1]}}</p>

</div>



Try it »

Example of AngularJS Arrays with ng-bind

Example 2




    


<div ng-app="" ng-init="myArr=['First Item','Second Item']">
    <p><span ng-bind="myArr.str1 + ',' + myArr.str2"></span></p>
</div>


Try it »

Tutorial

Expressions

AngularJs Directives

Controllers

AngularJs Filters

Http Methods

AngularJs Tables

Events

AngularJs Modules