2293 8/30/2015 9:28:29 PM

Example:

:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
:
<div  ng-app="mainApp" ng-init="quantity=10;cost=40;firstName='Sam';lastName='Anderson';student={firstName:'Nick',lastName:'Anderson'};exArray=[10,15,20,30,40,50]" ng-controller="MainCtrl">
        <h4>Expression using constants : {{ 50 + 50 }}</h4>        
        <h4>Expression using controller variables: {{helloWorldString}}</h4>        
        <h4>Expression using global variables (Using Currly Binding) : {{ quantity * cost }}</h4>
        <h4>Expression using global variables (Using ng-bind): <span ng-bind="quantity * cost"></span></h4>
        <h4>Expression using global variables - String operation: <span ng-bind="firstName + ' ' + lastName"></h4>
        <h4>Expression using global variables - Object operation: <span ng-bind="student.lastName"></h4>
        <h4>Expression using global variables - Array operation: <span ng-bind="exArray[3]"></h4>
    </div>
:
 var mainApp = angular.module('mainApp', []);
        mainApp.controller('MainCtrl', function ($scope) {
            $scope.helloWorldString = 'Hello World!!!';
        });
: