AngularJS: prevent a 404 error in img src attribute AngularJS: prevent a 404 error in img src attribute angularjs angularjs

AngularJS: prevent a 404 error in img src attribute


You should be using ng-src or the image url will be resolved literally. a video like http://www.dailymotion.com/thumbnail/video/4 does exist, but not the literal string http://www.dailymotion.com/thumbnail/video/{{video.id}}

I made a jsfiddle demonstrating the img ng-src behaviour. You can see with the network tab in Firebug that you don't get a 404 error.