내가 다음과 같습니다angularjs에서 src 속성 내에서 ng-repeat 변수를 사용합니까?
div.container
script(src='/js/bootstrap/holder.js')
p.text-info(ng-pluralize,
count="devices.length",
when="{ '0': 'There are no fragments.', 'one': 'There is 1 fragment.', 'other': 'There are {} fragments.'}")
ul.unstyled(ng-repeat='fragment in devices')
ul.thumbnails
li.span
div.thumbnail
img(src="holder.js/{{fragment.dimension.width}}x{{fragment.dimension.height}}")
div.caption
h3 {{fragment.name}}
p {{fragment.dimension}}
ul.unstyled(ng-repeat='component in fragment.components')
li {{ component.name }}
문제는 src="holder.js/{{fragment.dimension.width}}x{{fragment.dimension.height}}"
에, 즉 심지어 이미지가 표시되지 않습니다 내가 올바른 SRC (src="holder.js/300x200"
)를 참조 결과 HTML 보이는 것. 내 생각 엔이 속성 안의 각도 변수를 사용하는 방법이 아닙니다.
어떻게 작동합니까?
편집 : 그것은 여기 holder.js
.. 을 실행하지 않는 것 같다 소스입니다 : 내가 사용하는 첫 번째 호출에서 각 {{해시}} 두 번째 내가 수동으로 holder.js/300x200
<div class="thumbnail">
<img src="holder.js/1678x638">
<img src="data:image/png;base64,iVBORw0KG...ElFTkSuQmCC" data-src="holder.js/300x200" alt="300x200" style="width: 300px; height: 200px;">
</div>
, 코드에서 내가 볼 수있는 경우에도 : '' – fusio
는 [jsFiddle] (HTTP를 만드십시오 : // jsfiddle. net) 문제를 재현 할 수 있습니다. – Blackhole
음 ... 옥이 없으면 작동하는 것 같습니다. 옥과 모순이 될 수 있습니까? http://jsfiddle.net/vXA8b/2/ (jsfiddle에서 옥과 각진 작업을하는 방법을 모르겠다) – fusio