$ Dialog服务盒中的AngularJS jQuery文件上载插件错误

时间:2013-05-17 14:09:08

标签: javascript angularjs angular-ui

我正在使用找到的$ dialog bootstrap指令在$对话框中实现找到的jquery文件上传插件的{@ 3}}的AngularJS代码:http://blueimp.github.io/jQuery-File-Upload/

一切都按预期工作,模态出现正常,文件上传正常等等...问题是当模态关闭时,会出现3个错误,然后任何时候打开或关闭模态后,他们继续在控制台上显示。他们是:

cannot call methods on fileupload prior to initialization; attempted to call method 'processing'
cannot call methods on fileupload prior to initialization; attempted to call method 'active'
cannot call methods on fileupload prior to initialization; attempted to call method 'progress'

我可以看到错误可能发生的位置,我只是不确定为什么或如何解决这些问题。谢谢!

这是一个涉及相关问题的plnkr。 http://angular-ui.github.io/bootstrap/#/dialog

2 个答案:

答案 0 :(得分:3)

您应该在ng-attr-data-fileupload="options"中使用data-fileupload="options"代替user-photo-tpl.html。但为了实现这一点,您应该将角度升级到最新版本。这个ng-attr- *允许在解析后将属性添加到DOM元素中。

答案 1 :(得分:0)

这已在最新版本的插件中得到解决,回到仅使用data-fileupload参数。

该plunker已更新,以反映这一点。

相关问题