I have an application in which the value of an html element comes from server as a template. I'm trying to assign this template, which is basically a string and get the variables in template bound to controller but angular doesn't bind the variables.
To be more clear, I have a textarea like this
<textarea class="someclass" placeholder="${fbPostData.name}"
ng-model="fbPostMessage">
</textarea>
In my controller, I assign fbPostMessage to be:
$scope.fbPostMessage = "Join {{userFirstName}}. Subscribe today to have fun!"
After these steps in my view I don't see the variables replaced with their values, userFirstName
is not replaced by its value.
I've tried $compile
and it gave error. It probably expects html tags. How can I achieve what I want?