Angle function does not load in time?

Posted on

Question :

When I try to use the following code in a website template:

<img src="{{getImage(estabelecimento)}}">

The image loads correctly, but before loading this error appears in the console:


GET link 404
  (Not Found)

Everything leads me to believe that HTML tags are being loaded and executed before the angular directives, causing the text of the tag calling the function to appear in the HTML code for a few milliseconds.

Is there any way to fix this?


Answer :

Try with ng-src :

<img ng-src="{{getImage(estabelecimento)}}">



Leave a Reply

Your email address will not be published. Required fields are marked *