<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="./js/angular.min.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="MyController">
<div>My name is {{name}}</div>
</div>
<script>
var app = angular.module('myApp',[]);
app.controller('MyController',['$scope','$interpolate',function($scope,$interpolate) {
var tmp = $interpolate('Publish by {{name}} on {{date}}');
var data1 = {name: 'Mike',date: '2014-1-1'};
var str1 = tmp(data1);
$scope.name = str1;
}]);
</script>
</body>
</html>