1

Using a solution I found in a related question ( How do you use $sce.trustAsHtml(string) to replicate ng-bind-html-unsafe in Angular 1.2+)

The Filter answer on that page seems to be best.

app.filter('unsafe', function($sce) {
    return function(val) {
        return $sce.trustAsHtml(val);
    };
});

My images appear in IE 10, however they don't appear in Chrome or Safari. Can someone please help me understand why? To see my dilemma,go to http://groceryads.com and select a city from the dropdown.

Thanks in advance.

Community
  • 1
  • 1

1 Answers1

1

Doesn't seem to be an issue with angular, but css. If after selecting a city I run the following in dev tools I see your images just fine (Chrome):

$('#ifrss').contentWindow.window.$('img').css({width:100,height:100,maxWidth:'none'});
Jack
  • 20,735
  • 11
  • 48
  • 48
  • Thank you for the quick answer Jack. My css doesn't have any img related formatting, other than this: img.float { float: left; margin: 5px 15px 10px 0; border: 5px solid #A33000; } I see what you see in dev tools. I tried to add your jquery at the end of my dropdown event, however it doesn't seem to fix my issue. I'm still puzzled. – Joe Mitchell Jun 02 '14 at 17:56
  • @JoeMitchell Most of my snippet is for accessing the iframe. Assuming your code is actually running in the iframe you'd want to drop the first part and just do `$('img').css({width:100,height:100,maxWidth:'none'});` – Jack Jun 02 '14 at 19:28
  • '@Jack, adding img {max-width:none;} to my css works. Thanks for your help, I really appreciate it. – Joe Mitchell Jun 03 '14 at 02:01