我正在尝试插入我的"上传器"模板成模态。当"上传者"时,模态会出现。模板不在那里,如果另一个模板放在那里,模式也会弹出。我错过了什么?我怎么做错了它找不到uploader.html?一切都在同一个文件夹中。我拼写检查。我一直在尝试跟随流星厨师上传者https://themeteorchef.com/tutorials/uploading-files-to-amazon-s3
谢谢!
modal html
Function distancia(RangoA As Range, RangoB As Range) As Long
Dim s() As Variant
Dim t() As Variant
Dim r() As Variant
s = RangoA
t = RangoB
ReDim r(UBound(s), 1)
For i = 1 To UBound(s)
r(i, 1) = s(i, 1) - t(i, 1)
Next i
distancia = Application.MMult(r, Application.Transpose(r))
End Function
这是uploader.html
<template name="profilePicModal">
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
{{> uploader}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data- dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</template>
这是uploader.js
<template name="uploader">
<div class="upload-area">
<form id="upload">
<p class="alert text-center">
<span>Click or Drag a File Here to Upload</span>
<input type="file">
</p>
</form>
</div>
</template>
myModal.js
Template.uploader.events({
'change input[type="file"]' ( event, template ) {
Modules.client.uploadToAmazonS3( { event: event, template: template } );
}
});
答案 0 :(得分:0)
您的myModal.js文件似乎不完整且格式错误。 你可以解决它。
您的profilePicModal是否引用MyModal模板? 请确保使用您在HTML文件中定义的相同模板名称。