您可以使用该
$interpolate服务来插值字符串…
function ctrl ($scope, $interpolate) { $scope.Txt = "This is some text {{Rest}}"; $scope.Rest = "and this is the rest of it."; $scope.interpolate = function (value) { return $interpolate(value)($scope); };}<div ng-app ng-controller="ctrl"> <input ng-model="Txt" size="60" /> <p>{{ Txt }}</p> <p>{{ interpolate(Txt) }}</p></div>JSFiddle



