I need to render some html code AFTER angularjs has loaded. That html code 
includes an scope variable value. So in principle I have the following:

$scope.renderHtml = function (htmlCode) { return 
$sce.trustAsHtml(htmlCode); };
$scope.testText = "hello";
$scope.testing = '<h1>{{testText}}</h1>';
...
<div ng-bind-html="renderHtml(testing)"></div>

The result of this is "{{testText}}" rather than "hello". So it seems it is 
not possible to render html code that uses the content of a scope variable. 
Is this correct or am I doing something wrong? Is there another way to 
achieve the same (render html AFTER angularjs has loaded and that html uses 
a the content of a scope variable)?


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to