SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix(ngSrc): don't set src if value is empty string

Current implementation of ngSrc may lead to empty src attribute when page is loading.

For example:

<img ng-src="{{image.url}}">
can be temporarily rendered as

<img src="">
before the image resource is loaded.

Some browser emits a request to the current page when seeing <img src=""> (Firefox13 and IE8 will, Chromium20 won't), which leads to performance problems.
X
Xiangru Chen committed
b6e4a71166c7f00f4140fd7ea8f0cd81b4487a3f
Parent: d9eff86
Committed by Misko Hevery <misko@hevery.com> on 9/6/2012, 11:06:24 PM