这个
tutorial演示了使用指令ngSrc而不是src:
<ul class="phones"> <li ng-repeat="phone in phones" class="thumbnail"> <img ng-src="{{phone.imageUrl}}"> </li> </ul>
他们要求:@H_301_4@
Replace the ng-src directive with a plain old src attribute.
Using tools such as Firebug,or Chrome’s Web Inspector,or inspecting the
webserver access logs,confirm that the app is indeed making an
extraneous request to /app/%7B%7Bphone.imageUrl%7D%7D (or
/app/{{phone.imageUrl}}).@H_301_4@
我这样做,它给了我正确的结果:@H_301_4@
<li class="thumbnail ng-scope" ng-repeat="phone in phones"> <img src="img/phones/motorola-xoom.0.jpg"> </li>
有什么原因吗?@H_301_4@