Hello, Could you please help me to display images from http url. ? .
here are the steps that i followed .
-
white listed image source using $compileProvider in app.config.
$compileProvider.imgSrcSanitizationWhitelist(/^\s(https|file|blob|cdvfile):|data:image//); -
and in controlller I am getting list of item name and image url from web api which is hosted on azure (e.g. http://abc.cloudapp.net
$scope.messages = [
{
“PromoText”: “hello”,
“PromoImgUrl”: “http://xyz.blob.core.windows.net:443/promo--img/ch-img-9defc4ab-d0ce-4c8a-a6fe-71c3790b1ee7.png”,
}
];
-
here is view source.
<h3>{{msg.PromoText}}</h3> <img ng-src="{{msg.PromoImgUrl}}" class="feedImg" />
I tried all approaches but no luck to display images in my app.