0
I have an object in the following format:
Inside the main object has an object called upload. This object contains information about the images to be rendered.
I’m trying to do it like this:
ng-src="{{o.way}}{{o.original_filename}}"
But it doesn’t work at all. Returns the message :
Error: [$Interpolate:noconcat] Error while interpolating: {{o. way}}/{{o. original_filename}} Strict Contextual Escaping disallows interpolations that concatenate Multiple Expressions when a Trusted value is required.
I found something on the $sce ms n helped me mt.
I’m using an angle library to make a slide.
<slidecontainer ng-repeat="o in dataProject.upload.data">
<slide ng-src="{{o.way}}/{{o.original_filename}}"></slide>
</slidecontainer>
got it : <img data-ng-src="{{image.way + image.original_filename}}">
– hisoka
Interesting. In fact this angular attribute requires you to use at most one expression, each of which
{{ }}
represents an expression. In this case, even if you are concatenating values, this concatenation is within a single expression{{ }}
, so it works, it’s even simpler than the solution I suggested. Good!– Alisson