【发布时间】:2014-07-22 06:30:49
【问题描述】:
这是我的 app.js 文件中的产品详细信息。
{
code:'18471IN-4-CP',
name:'Symbol Bath and Shower Trim',
price:22875.95,
description:'Symbol recessed bath and shower faucet trim with lever handle and diverter button.',
specification:'These are the new specs from json.',
canPurchase:true,
soldOut:false,
images:[
{
full:'BathTub.jpg',
thumb:'Pipe.jpg'
},
{
full:'Shower Trim1.jpg',
thumb:'Pipe1.jpg'
}
],
technicalDetail:'6311W-926.pdf',
cadDrawing: 'k_6311w_0.dwg'
},
下面的 html 代码根据 app.js 中的 json var 详细信息从 img 文件夹加载图像
<img ng-src="img/{{product.images[0].thumb}}">
如何放置允许下载 pdf 的链接(pdf 文件夹中的 6311W-926.pdf)或任何其他文件扩展名?
类似 --- ng-src="pdf/{{product.technicalDetail}}"
【问题讨论】:
标签: javascript html angularjs pdf