Ng-Bind-6

 

We have an array with some random numbers and with the help of ng-repeat directive we bind these numbers to the span element to display the list of the numbers.

 
 
 
<!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"> <div ng-repeat="array in Array"> <span ng-bind="array"></span> <br /> </div> </div> <script> var app = angular.module("myApp", []); app.controller('myController', ['$scope', function ($scope) { $scope.Array = [1, 2, 4, 5, 6, 8, 9, 0, 12, 43, 13, 54]; }]); </script> </body> </html>
Output