重新使用" creationView()。fields()"时,如何删除特定字段?在ng-admin?

时间:2016-06-21 16:04:14

标签: ng-admin

我想重复使用我在ng-admin中创建的几个字段,但一个特定字段除外。

我怎样设法做到这一点?

这是我使用的代码:

post.editionView()
        .title('Edit post "{{ entry.values.title }}"') // 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([
            post.creationView().fields(), //<--- I'd like to remove one field from here

谢谢,

1 个答案:

答案 0 :(得分:0)

您可以通过将字段传递给editionView

来实现
currentInventoryItem.editionView()
            .title('Update Inventory Items')
            .fields(                
                nga.field('consume'),
                nga.field('add'),
                nga.field('price')
            )