Listing Array

Sunny.Sagar
Posted by Sunny.Sagar under AngularJS category on | Points: 40 | Views : 254
<body>
<h4>Listing array</h4>
<script>
var usernames = ['Sagar', 'Sunny', '99'];

var app = angular.module("app", []);
app.controller("ArrayController", ["$scope", function ($scope) {
$scope.Usernames = usernames;
}]);

</script>

<div ng-app="app" ng-controller="ArrayController">
<ul>
<li ng-repeat="username in Usernames">{{username}}</li>
</ul>
</div>
</body>

Comments or Responses

Login to post response