【发布时间】:2016-06-10 09:35:07
【问题描述】:
在 ng-admin 编辑视图中,我需要更改带有 id 的文件上传 url,如下所示,但我不知道如何在 uploadInformation 基础 url 中获取所选实体的 id,例如 {{entry.values.id}}是我的代码:
files.editionView()
.title('Edit File {{ entry.values.id }}({{ entry.values.filePath}})') // title() accepts a template string, which has access to the entry
.actions(['list', 'show', 'delete']) // choose which buttons appear in the top action bar. Show is disabled by default
.fields([
nga.field('id').label('id').editable(false),
nga.field('file', 'file').uploadInformation({ 'url': baseurl +"files/upload/{{entry.values.id}}"}),// fields() without arguments returns the list of fields. That way you can reuse fields from another view to avoid repetition
])
【问题讨论】:
标签: angularjs restangular ng-admin