列表视图链接包含特殊符号

时间:2016-09-13 07:05:06

标签: javascript angularjs ng-admin

我的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)

1 个答案:

答案 0 :(得分:0)

ng-admin使用angular-translate,去看看它如何与ng-admin一起使用。