Well, i have a object like to:
$scope.variable = "mike";
$scope.country = "...";
$scope.posts = [
...
{
id:1,
name: 'bla bla bla',
content: 'Hello, my name is {{variable}} and i am from {{country}}'
},
...
];
So, how i can evaluating or parse content property?
My idea is used it in my view like this:
<a ng-click=" variable = 'John' ">Change name here!</a>
<div ng-repeat="post in posts">
<h1>{{post.name}}</h1>
<p>{{post.content}}</p>
</div>
Thanks
postsdata before attaching it to the scope, or you'll have to transform it as it's rendered, i.e<p>{{replaceVariables(post.content)}}</p>- and then you would make a$scope.replaceVariables = function(content){...};that does the replacing, using any of the answers mentioned below. scope.$eval() might help out too.