0
我有产品下面的列表模型...EmberJS:排序按属性模型属于关联
{
products: [
{
id: 1,
something: "value",
properties: {
name: "Name1"
}
},
{
id: 2,
something: "value",
properties: {
name: "Name3"
}
},
{
id: 3,
something: "value",
properties: {
name: "Name2"
}
}
]
}
如果我通过在“product.properties.name”整理整理这些产品我会怎么做?我最初的想法是使用sortableMixin并用下面的代码片段:
sortProperties: ['properties.name'],
sortAscending: true
但是,这并没有真正的产品,结果我的本意。我应该怎么做呢?