scope data with unescaped entity

Description

The following code shows how to use scope data with unescaped entity.

Example


<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!-- w w w. ja va 2 s .c o  m-->

<body ng-app="myApp">
  <div ng-controller="MyCtrl">
  Hello, {{myName}}!
  </div>
<script type='text/javascript'>
    var myApp = angular.module('myApp',[]);
    function MyCtrl($scope) {
        $scope.myName = 'hi &';
    }
</script>
</body>
</html>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities