ProgrammerGuide.Net | Step by Step Programmer Guide

AngularJS Expressions with Arrays by Example | AngularJS Interview Question | AngularJS Programmer Guide and Tutorials

AngularJS expressions are written inside double braces: {{ expression }}. AngularJS arrays are like JavaScript arrays.

<div ng-app=“” ng-init=“points=[1,15,19,2,40]”>

<p>The points are {{ points[2] }}</p>


We can also rewrite the above code using ng-bind as below:

<div ng-app=“” ng-init=“points=[1,15,19,2,40]”>

<p>The points are <span ng-bind=“points[2]”></span></p>


Please click here for related products on Amazon!


Add comment

Want to Check Celebrities News?