【问题标题】:File upload with Angular使用 Angular 上传文件
【发布时间】:2017-11-13 17:25:01
【问题描述】:

我正在尝试实现 - https://github.com/spartaksun/ng2-file-uploader#backend-example-using-plain-php

我已经安装了 ng2-file-uploader ,在我的 component.ts 中我试图按照指导添加代码,当我添加 directives: [UPLOAD_DIRECTIVES] 时,它给了我错误 -

@Component({
  selector: 'demo-app',
  templateUrl: 'app/demo.html',
  directives: [UPLOAD_DIRECTIVES],
})

【问题讨论】:

标签: php angular file-upload


【解决方案1】:

请阅读 Angular 2 的最新文档

指令不再是@Component 的元数据属性。

请阅读:https://angular.io/docs/ts/latest/api/core/index/Component-decorator.html

注意: 您尝试使用的插件已有 1 年历史,因此它必须使用 angular beta 版本,而不是最终版本。

【讨论】:

  • 请指导任何示例使用php从最新的角度上传文件[请提供简单的php代码],我将非常感激
  • 这又是一个老例子了,是不是 />
  • 我不这么认为。
猜你喜欢
  • 1970-01-01
  • 2020-12-31
  • 2014-03-02
  • 2015-03-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-30
相关资源
最近更新 更多