Angularjs Array Example - Jquery

How to create array in angularjs?

Snippet Code


  
Rate this page :
  [ 0 votes]

Angularjs is a simple technique used to create web applications. Array is generally used to store multiple values in a single variable. Creating an array in the angularjs is same as in the javascript.Here, the below code creates an array holding points:

<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <div ng-app="" ng-init="points=[1,7,14,21,40]"> <p>The third array value is {{ points[2] }}</p> </div>

Tags


Ask Questions

Ask Question