Hi,

I'm new to angularjs, I have one custom directive in which I need to 
compile angular scope to render scope value (which is dynamic) properly. 
Can somebody help me? Here is code

<div test="{{ view.test }}" ></div>

.directive('test',function(config, $sc,$compile) {
     return {
                restrict: 'A',
                compile: function(scope, el, attrs) {
                   var test = el.test;
                   el.test = $sce.trustAsHtml(test);
                   el = $compile(el)(scope);
                }
            }

})

I tried using compile but it's not happening and it renders {{test}} in UI.

Thanks in advance

-- 
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