Prev Demo
AngularJS
>
Listing From Array
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> </head> <body> <h4>Looping array using inline initialization</h4> <div ng-app ng-init="usernames = ['Sheo', 'Narayan', 'Dutta']"> <ul> <li ng-repeat="username in usernames">{{username}}</li> </ul> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output