The ngBind attribute tells Angular to replace the text content of the specified HTML element with the value of a given expression, and to update the text content when the value of that expression changes.
So this means you <svg /> is overwritten. Simply remove the ng-bind.
--
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+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
json = Resource {$promise: Object, $resolved: false, $get: function, $save: function, $query: function…} $promise: Object $resolved: true svg: "<svg height="30" width="200"><text x="0" y="15" fill="red">Hello World !</text></svg>" __proto__: Resourcejsonsvg = undefined
Error: [$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object
http://errors.angularjs.org/1.2.20/$resource/badcfg?p0=array&p1=object
$scope.json.$promise.then(function(json) { $scope.svg = $sce.trustAsHtml(json.svg);
});