javascript - ExtJS中模型中URL中间的ID
问题描述
是否可以有一个像domain/users/{ID}/posts
ExtJS 模型一样的 URL?
此 URL 将获取给定用户 ID 的用户的所有帖子。
Ext.define('UserPosts', {
extend: 'Ext.data.Model',
fields: [{
name: 'title',
type: 'string'
}, {
name: 'body',
type: 'string'
}],
proxy: {
type: 'rest',
noCache: false,
pageParam: '',
startParam: '',
limitParam: '',
groupParam: '',
url: `domain/users/{ID}/posts`,
reader: {
type: 'json'
}
}
});
解决方案
推荐阅读
- sql - Spring 和 Progress-4GL - 更改 JPA 模式命名查询格式
- java - 使用 Java 修复结束标记
- r - 在 mgcViz 图中结合多个集群的 gam 平滑
- spring - 使用 Spring 集成将字符串从 mqtt 转换为对象
- javascript - 用于拆分数学表达式的正则表达式
- linux - Substrate 节点模板 make: *** [Makefile:19: build] 错误 101
- arrays - 使用自定义数据进行多选
- css - 语法错误:未知单词 (8:3) 请在 react JS 中解决此错误
- python - 自动检测矩阵大小,numpy
- angular - 在 Reactive Form 上制作 FormArray 控件