Repeating HTML Elements in AngularJS

The ng-repeat Directive The ng-repeat directive clones HTML elements once for each item in a collection (in an array).

Sample Code:

<!DOCTYPE html>
<script src= ""></script>
<div data-ng-app="" data-ng-init="names=['Test1','Test2','Test3']">
<p>Looping Example in AngularJS</p>
<li data-ng-repeat="x in names">
{{ x }}



No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit