In ng-admin: Add editionView to entity without a listView

87 views Asked by At

Say, you want to edit a singleton, then you do not have a list of objects and hence it would be useful to only offer an editionView, but no listView for an ng-admin entity.

For instance as:

var admin = nga.application("Dashboard");
    admin.baseApiUrl("/some/rest/endpoint/");
var entity = nga.entity("config");

entity.editionView().fields([
    nga.field('settings1'),
    nga.field('settings2')
]);

admin.addEntity(entity);

attempting to run this, no menu is rendered for the config entity.

Is there any possibility to get this to work?

0

There are 0 answers