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?
$scope.test_value = "test";then replacingng-model="test_value"2) ensure that angular knows about the update by doing$scope.$digest();(this should be a last resort)$compileandng-bind-html, this question can help