Intoduction :-
Hii Friends...
* ng-app
<html>
<html>
Hii Friends...
Today I explain about Angular Directives.
1) Angular JS use new attribute i.e called Directives.
2) Angular JS offers functionality to your applications because it has set of built-in directives.
3) There are many types of Directives like -
* ng-app
* ng-init
* ng-model
* ng-repeat
Now here I put a example on ng-repeat Directive.
Example :- 1
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="" ng-init="names=['Jorge','Herry','bets','renot']">
<p>List with ng-repeat:</p>
<ul>
<li ng-repeat="x in names">
{{ x }}
</li>
</ul>
</div>
</body>
</html>
DEMO
List of details:
- {{ x.name + ', ' + x.country }}
0 comments:
Post a Comment