Angular directive as angular-translate value

130 Views Asked by At

i'm having an issue trying to get a directive work as a value of a translation. here's what i have

scope.value = '<img class="picture portrait" ng-src="' + url + '"></img>';
scope.key = 'PICTURE';

and in my view:

<span translate="{{key}}" translate-values="{{value}}" translate-compile></span>

when i inspect the element, the ng-src attribute is not on the tag anymore

i configured it with:

$translateProvider.useSanitizeValueStrategy('sanitize');
$translateProvider.usePostCompiling(true);

i'm not sure what's going on, but i think the $sanitize service strips the ng-src from the html, i don't know how to prevent it, if you have any ideas, they will be warmly welcome

0

There are 0 best solutions below