Twitter bootstrap 如何使用meteor.js在引导模式中填充现有数据
addinfo.htmlTwitter bootstrap 如何使用meteor.js在引导模式中填充现有数据,twitter-bootstrap,meteor,Twitter Bootstrap,Meteor,addinfo.html 添加艺术描述 标题 {{title}} 类别 {{category}} 艺术描述 {{artDescription}} 提交 接近 addinfo.js `Template.addInfo.events({ “提交.添加图像信息”:函数(事件){ }))` 如何使用模式中的现有值填充标题、类别、说明 打开模式时,应显示包含现有数据的默认值 Template.addInfo.helpers({ Images:function(){ return Images
添加艺术描述
标题
{{title}}
类别
{{category}}
艺术描述
{{artDescription}}
提交
接近
addinfo.js
`Template.addInfo.events({
“提交.添加图像信息”:函数(事件){
}))`
如何使用模式中的现有值填充标题、类别、说明
打开模式时,应显示包含现有数据的默认值
Template.addInfo.helpers({
Images:function(){
return Images.find();
}
});
如果您有多个图像,并且希望显示特定图像的数据,则必须使用一些参数进行查找。此外,还必须添加
<template name="addInfo">
{{#each Images}}
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel">..Remaining Code...</div>
{{/each}}
</template>
{{{#每个图像}
…剩余代码。。。
{{/每个}}
您希望首先在模式中显示数据库中已有的数据。对吗?是的。打开模式时应显示现有数据。已使用会话变量完成。只需知道如何在模式中检索现有数据。弹出时
<template name="addInfo">
{{#each Images}}
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel">..Remaining Code...</div>
{{/each}}
</template>