Angularjs Examples

AJS Examples


AngularJS Expression using ng-bind with Object

In this AngularJS expression example you will learn how to use ng-bind with Object to bind data in HTML DOM elements.

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.

AngularJS ng-bind with Object

AngularJS ng-bind with Object Expressions.

Syntax

<div ng-init="customer={ name:'Jimi Scott',address:'12-13-283/A1', email:'jimi@yahoo.com'}"> 
  Expression Result: <b><span ng-bind=" 'Name: ' + customer.name + '  Address: '   
  + customer.address + '  Email : ' + customer.email"></span></b>
</div>       

AngularJS Expression using ng-bind with Object Example

<html>    
<head>    
<title>Expression with Object using ng-bind in AngularJS</title>    
<script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">    
</script>    
</head>    
<body style="background-color:#DDE4E9;font-family:arial;">        
  <fieldset style="background-color:#DDE4E9;">                    
    <legend>AngulerJS Expression with Object using ng-bind Example</legend>   
<div ng-app=''>    
<div ng-init="customer={ name:'Jimi Scott',address:'12-13-283/A1', email:'jimi@yahoo.com'}"> 
  Expression Result: <b><span ng-bind=" 'Name: ' + customer.name + '  Address: '   
  + customer.address + '  Email : ' + customer.email"></span></b>
</div>    
</div>   
 </fieldset>   
</body>    
</html>