Angularjs Examples

AJS Examples


What is Directives in AngularJS

In this AngularJS basic example you will learn what is directives in AngularJS and how to use in HTML DOM to perform specific operation.

Here you can view the output of the example and you can also "try it yourself" by clicking on "Live Demo" button given at the bottom.

Syntax

<div ng-init="customer={name:'Jimi',address:'12-13-283/A1',email:'[email protected]' }"> 
</div>
<span ng-bind="customer.name""></span>

What is expression in AngularJS

<html>  
<head> <!-- www.techstrikers.com -->  
<title>My first AngularJS code</title>  
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">  
</Script>  
</head>  
<body>  
<div ng-app="">  
<div ng-init="customer={name:'Jimi',address:'12-13-283/A1',email:'[email protected]' }">   
Name:- <span ng-bind="customer.name"></span></br>  
Address:- <span ng-bind="customer.address"></span></br>  
Email:- <span ng-bind="customer.email"></span>  
</div>  
</body>  
</html>