Ng-Bind-8

 

In this example, we have an array named flowersArray with the names of flowers. We bind the 7th element ng-bind="flowersArray[6]" to the span tag and in the array element on the 7th position will be bind with this span tag.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app="myApp"> <div ng-controller="myController"> <span ng-bind="flowersArray[6]"></span> <br /> </div> <script> var app = angular.module("myApp", []); app.controller('myController', ['$scope', function ($scope) { $scope.flowersArray = ["Rose", "Sun Flower", "Merry Gold", "Lily", "Bluebell", "Bergamot", "Bellflower", "Begonia", "Aster"] }]); </script> </body> </html>
Output