Append to value from scope in expression

Description

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><!-- ww  w . j a  v a2  s .  co  m-->
<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>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities