If you wish to simply display a raw html (without  sanitazing), you can use 
a filter

    .filter('raw', ['$sce', function($sce) {
        return function(val) {
            return $sce.trustAsHtml(val);
        };
    }]);

And then in your view:

<p class="content" ng-bind-html="post.body.und[0].safe_value | raw"></p>

On Wednesday, March 12, 2014 2:39:52 AM UTC+4, Michel Morelli wrote:
>
> Hi all, via a GET REST I get my data. 
> One of the fields of my data contains HTML code. If I do a 
> console.log(data.body)  I can see this: 
>
>
>    1. format: "filtered_html"
>    2. safe_summary: ""
>    3. safe_value: "<p>Questa è una prova</p>↵"
>    4. summary: ""
>    5. value: "Questa è una prova"
>
>
> Now I need to display “safe_value”, but how ? 
> If I write: 
>
> <p class="content">
> {{post.body.und[0].safe_value}}
> </p>
>
> I see (into my browser)
>
> <p>Questa è una prova</p> 
>
> I have read something about ng-bind-unsafe-html, but I have not understand 
> it.
>
> How can I display “Questa è una prova” get via “safe_value” ? 
>
> Thanks.
>
> M.
>
> --
> Davide Morelli
> ziob...@gmail.com <javascript:>
>
>
>
>  
>

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to