AngularJS Tutorial - Append to value from scope in expression








The following code shows how to Append to value from scope in expression.

Example


<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--from   w w w  .j  av a 2  s  . com-->
<body>
    <div ng-app="">
        <div ng-controller="FirstCtrl">
            {{data.message + " world"}}
        </div>
    </div>
<script type='text/javascript'>
function FirstCtrl($scope) {
    $scope.data = {
        message: "Hello"
    };
}
</script>
</body>
</html>

The code above is rendered as follows: