Angularjs Examples

AJS Examples


Expression Example in AngularJS

In this AngularJS expression example you will learn how to how to bind data from model to HTML DOM elements and similar to ng-bind directive.

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

{{ expression }} 

Simple expression example in AngularJS

<!DOCTYPE html>
<html>  
<head>  <!-- www.techstrikers.com -->
<title>A simple expression example 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;">            
    <legend>AngulerJS Simple Expression Example</legend>  
   <b>Expression Result: {{ 12 + 50 }} </b> 
 </fieldset>   
</body>  
</html>