Angularjs Examples

AJS Examples


AngularJS Expression using ng-bind with String

In this AngularJS expression example you will learn how to use ng-bind with String 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 String

AngularJS ng-bind with String expressions.

Syntax

<div ng-init="firstName='Jimi';lastName='Scott'">  
 <b>Expression Result : <span ng-bind="firstName  + '  ' + lastName"></span></b>  
	</br>     
</div>       

AngularJS Expression using ng-bind with String Example

<!DOCTYPE html>    
<html>      
<head>  <!-- www.techstrikers.com -->    
<title>Expression with String using ng-bind in AngularJS</title>      
<script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">      
</script>      
</head>      
<body ng-app=''>     
 <fieldset style="background-color:#DDE4E9;font-family:arial;">                
    <legend>AngulerJS Expression with String using ng-bind Example</legend>      
   <div ng-init="firstName='Jimi';lastName='Scott'">  
     <b>Expression Result : <span ng-bind="firstName  + '  ' + lastName"></span></b>  
        </br>     
    </div>       
 </fieldset>       
</body>      
</html>