我的listview
网址如下所示:
http://localhost/inventorymanagement/#/~2Finventory~2Frequest~2Fitem~2F/list
如何将其更改为这样的 readbale 形式?:
http://localhost/inventorymanagement/#/inventory/request/item/list
请查看我的 js 文件。
// create an admin application
var admin = nga.application('admin')
.baseApiUrl(BASE_URL); // main API endpoint
// //create a user entity
// //the API endpoint for this entity will be 'http://jsonplaceholder.typicode.com/users/:id
var inventoryItem = nga.entity('/inventory/request/item/');
inventoryItem.listView().fields([
// use the name as the link to the detail view - the edition view
nga.field('user_details.email').label('email'),
nga.field('required_quantity'),
nga.field('demand_date'),
nga.field('inventor_item_details.item_title').label('Item Title'),
]).filters([
nga.field('user_details.email')
.label('User Filter')
.pinned(true)
]);
admin.addEntity(inventoryItem)